You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[wasm] bump devDependencies to rollup 3 and TypeScript 4.9 (#78726)
* Bump dev dependencies
Typescript 4.9
rollup 2.79.1 (can't bump to rollup 3 until rollup-plugin-consts
1.1.1 is published to raise it's upper bound rollup dependency)
* bump to rollup 3
replace untmainained rollup-plugin-terser with @rollup/plugin-terser
replace rollup-plugin-consts with a shim @rollup/plugin-virtual.
They do the same thing, but consts is more opinionated about how it
names its modules
* Commit new package-lock.json
* Create package-lock.json using npm v6 (from Emscripten)
And use the dnceng npm registry
* update README with more details about upgrading NPM packages
* Make markdownlint happy
Copy file name to clipboardExpand all lines: src/mono/wasm/README.md
+49-15Lines changed: 49 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Add `~/.jsvu` to your `PATH`:
71
71
72
72
* Install node/npm from https://nodejs.org/en/ and add its npm and nodejs directories to the `PATH` environment variable
73
73
74
-
**Install jsvu with npm:
74
+
* Install jsvu with npm:
75
75
76
76
`npm install jsvu -g`
77
77
@@ -135,7 +135,7 @@ Exceptions thrown after the runtime starts get symbolicating from js itself. Exc
135
135
136
136
If you need to symbolicate some traces manually, then you need the corresponding `dotnet.js.symbols` file. Then:
137
137
138
-
```
138
+
```console
139
139
src/mono/wasm/symbolicator$ dotnet run /path/to/dotnet.js.symbols /path/to/file/with/traces
140
140
```
141
141
@@ -155,7 +155,7 @@ To run a test with `FooBar` in the name:
155
155
156
156
Additional arguments for `dotnet test` can be passed via `MSBUILD_ARGS` or `TEST_ARGS`. For example `MSBUILD_ARGS="/p:WasmDebugLevel=5"`. Though only one of `TEST_ARGS`, or `TEST_FILTER` can be used at a time.
157
157
158
-
-Chrome can be installed for testing by setting `InstallChromeForDebuggerTests=true` when building the tests.
158
+
Chrome can be installed for testing by setting `InstallChromeForDebuggerTests=true` when building the tests.
159
159
160
160
## Run samples
161
161
@@ -189,13 +189,15 @@ To test changes in the templates, use `dotnet new install --force src/mono/wasm/
@@ -210,23 +212,56 @@ Bumping Emscripten version involves these steps:
210
212
* update packages in the workload manifest https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.json.in
211
213
212
214
## Upgrading NPM packages
215
+
216
+
Two things to keep in mind:
217
+
218
+
1. We use the Azure DevOps NPM registry (configured in `src/mono/wasm/runtime/.npmrc`). When
219
+
updating `package.json`, you will need to be logged in (see instructions for Windows and
220
+
mac/Linux, below) in order for the registry to populate with the correct package versions.
221
+
Otherwise, CI builds will fail.
222
+
223
+
2. Currently the Emscripten SDK uses NPM version 6 which creates `package-lock.json` files in the
224
+
"v1" format. When updating NPM packages, it is important to use this older version of NPM (for
225
+
example by using the `emsdk_env.sh` script to set the right environment variables) or by using the
226
+
`--lockfile-format=1` option with more recent versions of NPM.
227
+
228
+
### Windows
229
+
230
+
The steps below will download the `vsts-npm-auth` tool from https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-public-npm/connect/npm
231
+
213
232
In folder `src\mono\wasm\runtime\`
233
+
214
234
```sh
215
235
rm -rf node_modules
216
236
rm package-lock.json
217
-
npm install -g vsts-npm-aut`
237
+
npm install -g vsts-npm-auth`
218
238
vsts-npm-auth -config .npmrc
219
-
npm npm cache clean --force
239
+
npm cache clean --force
220
240
npm outdated
221
-
npm update
241
+
npm update --lockfile-version=1
242
+
```
243
+
244
+
### mac/Linux
245
+
246
+
Go to https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-public-npm/connect/npm and log in and click on the "Other" tab.
247
+
Follow the instructions to set up your `~/.npmrc` with a personal authentication token.
248
+
249
+
In folder `src/mono/wasm/runtime/`
250
+
251
+
```sh
252
+
rm -rf node_modules
253
+
rm package-lock.json
254
+
npm cache clean --force
255
+
npm outdated
256
+
npm update --lockfile-version=1
222
257
```
223
258
224
259
## Code style
260
+
225
261
* Is enforced via [eslint](https://eslint.org/) and rules are in`./.eslintrc.js`
226
262
* You could check the style by running `npm run lint`in`src/mono/wasm/runtime` directory
227
263
* You can install [plugin into your VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to show you the errors as you type
228
264
229
-
230
265
## Builds on CI
231
266
232
267
* For PRs, tests are generally triggered based on path changes. But if you have a change which would not trigger the relevant builds, then you can run `runtime-wasm` pipeline manually to run all of them. Comment `/azp run runtime-wasm` on the PR.
@@ -251,7 +286,6 @@ npm update
251
286
| Debugger tests | linux+windows: only-pc |
252
287
| Runtime tests | linux+windows: only-pc |
253
288
254
-
255
289
### Run manually with `/azp run ..`
256
290
257
291
*`runtime-wasm*` pipelines are triggered manually, and they only run the jobs that would not run on any default pipelines based on path changes.
0 commit comments