Skip to content

Commit

Permalink
Initialize TypeScript (rstudio#3296)
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke authored Feb 25, 2021
1 parent 60db1e0 commit 1b8635d
Show file tree
Hide file tree
Showing 101 changed files with 34,780 additions and 9,738 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
^\.travis\.yml$
^staticdocs$
^tools$
^srcjs$
^srcts$
^CONTRIBUTING.md$
^cran-comments.md$
^.*\.o$
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/rituals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/all/__linux__/xenial/latest"}
- { os: ubuntu-16.04, r: '4.0', node: "14.x", rspm: "https://packagemanager.rstudio.com/all/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: ${{ matrix.config.node }}
# https://github.com/actions/cache/blame/ccf96194800dbb7b7094edcd5a7cf3ec3c270f10/examples.md#L185-L200
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -120,18 +120,18 @@ jobs:
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ matrix.config.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ matrix.config.os }}-${{ matrix.config.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ matrix.config.os }}-yarn-
${{ matrix.config.os }}-${{ matrix.config.node }}-yarn-
- name: Build JS
run: |
cd tools
yarn install --frozen-lockfile
yarn build
git add ../inst
git commit -m 'yarn build (GitHub Actions)' || echo "No yarn changes to commit"
cd srcts
tree src
yarn install --immutable && yarn build
git add ./src && git commit -m 'yarn lint (GitHub Actions)' || echo "No yarn lint changes to commit"
git add ../inst && git commit -m 'yarn build (GitHub Actions)' || echo "No yarn build changes to commit"
- name: Check node build
- name: Check JS build is latest
run: |
./tools/checkJSCurrent.sh
Expand All @@ -145,3 +145,9 @@ jobs:
if: github.event_name == 'push'
run: |
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to push"
# Execute after pushing, as no updated files will be produced
- name: Test TypeScript code
run: |
cd srcts
yarn test
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ shiny 1.6.0.9000

### Minor new features and improvements

* Shiny's core JavaScript code was converted to TypeScript. For the latest developement information, please see the [README.md in `./srcts`](https://github.com/rstudio/shiny/tree/master/srcts). (#3296)

* Switched from `digest::digest()` to `rlang::hash()` for hashing. (#3264)

* Switched from internal `Stack` class to `fastmap::faststack()`, and used `fastmap::fastqueue()`. (#3176)
Expand Down
Loading

0 comments on commit 1b8635d

Please sign in to comment.