Skip to content

Commit 1b8635d

Browse files
authored
Initialize TypeScript (#3296)
1 parent 60db1e0 commit 1b8635d

File tree

101 files changed

+34780
-9738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+34780
-9738
lines changed

.Rbuildignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
^\.travis\.yml$
1313
^staticdocs$
1414
^tools$
15-
^srcjs$
15+
^srcts$
1616
^CONTRIBUTING.md$
1717
^cran-comments.md$
1818
^.*\.o$

.github/workflows/rituals.yaml

+16-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
config:
23-
- { os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/all/__linux__/xenial/latest"}
23+
- { os: ubuntu-16.04, r: '4.0', node: "14.x", rspm: "https://packagemanager.rstudio.com/all/__linux__/xenial/latest"}
2424

2525
env:
2626
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
@@ -110,7 +110,7 @@ jobs:
110110
111111
- uses: actions/setup-node@v1
112112
with:
113-
node-version: '12.x'
113+
node-version: ${{ matrix.config.node }}
114114
# https://github.com/actions/cache/blame/ccf96194800dbb7b7094edcd5a7cf3ec3c270f10/examples.md#L185-L200
115115
- name: Get yarn cache directory path
116116
id: yarn-cache-dir-path
@@ -120,18 +120,18 @@ jobs:
120120
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
121121
with:
122122
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
123-
key: ${{ matrix.config.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
123+
key: ${{ matrix.config.os }}-${{ matrix.config.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
124124
restore-keys: |
125-
${{ matrix.config.os }}-yarn-
125+
${{ matrix.config.os }}-${{ matrix.config.node }}-yarn-
126126
- name: Build JS
127127
run: |
128-
cd tools
129-
yarn install --frozen-lockfile
130-
yarn build
131-
git add ../inst
132-
git commit -m 'yarn build (GitHub Actions)' || echo "No yarn changes to commit"
128+
cd srcts
129+
tree src
130+
yarn install --immutable && yarn build
131+
git add ./src && git commit -m 'yarn lint (GitHub Actions)' || echo "No yarn lint changes to commit"
132+
git add ../inst && git commit -m 'yarn build (GitHub Actions)' || echo "No yarn build changes to commit"
133133
134-
- name: Check node build
134+
- name: Check JS build is latest
135135
run: |
136136
./tools/checkJSCurrent.sh
137137
@@ -145,3 +145,9 @@ jobs:
145145
if: github.event_name == 'push'
146146
run: |
147147
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to push"
148+
149+
# Execute after pushing, as no updated files will be produced
150+
- name: Test TypeScript code
151+
run: |
152+
cd srcts
153+
yarn test

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ shiny 1.6.0.9000
99

1010
### Minor new features and improvements
1111

12+
* 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)
13+
1214
* Switched from `digest::digest()` to `rlang::hash()` for hashing. (#3264)
1315

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

0 commit comments

Comments
 (0)