-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update npm dependencies to latest (#798)
Updated all direct npm dependencies to `@latest`. Observed changes: - Prettier: now adds trailing commas to all lists. prettier/prettier#11479 - Katas: `marked` now omits `id` attributes for header tags (confirmed benign) markedjs/marked#2890 - Other trivial differences in JS emit through `esbuild`. I was really hoping this would be a trivial process, but sadly it wasn't. For posterity, here's what the process ended up being: ```js const { execSync } = require("node:child_process"); function run(command) { console.log(`running command ${command}`); return execSync(command); } const deps = JSON.parse(run(`npm ls --package-lock-only --json`)); // Do these in this order first, otherwise @typescript-eslint/eslint-plugin // gets really upset about the peer dependency missing run("npm install @typescript-eslint/parser@latest"); run("npm install @typescript-eslint/eslint-plugin@latest"); // Update all direct deps to @latest for (const depName of Object.keys(deps.dependencies)) { if (!depName.startsWith("qsharp")) { run(`npm install ${depName}@latest`); } } // Update indirect deps in package-lock.json run("npm update"); // This fixes the workspace names in package-lock.json, // which for some reason get erased above run("npm install"); ``` Ran `./build.py` to confirm the repo still built, discovered formatting changes. To reformat with new Prettier defaults: ```bash npm run prettier:fix ``` Since we pulled a lot of JS tooling updates, I ran a quick script to save the built artifacts so I could diff the JS output: ```bash #!/bin/bash set -e # clean repo git clean -fdx rm -rf baseline-compare/ mkdir baseline-compare # build ./build.py --wasm --npm --vscode --no-check --no-test # npm mkdir -p baseline-compare/npm pushd npm npm pack --pack-destination . popd tar -xzf npm/qsharp-lang-0.0.0.tgz -C baseline-compare/npm # vsix npm install -g @vscode/vsce pushd vscode vsce package --pre-release popd unzip vscode/qsharp-lang-vscode-dev-0.0.0.vsix -d baseline-compare/vscode # commit baseline cp package-lock.json baseline-compare/ git add baseline-compare/ git commit -m "Baseline for $(git rev-parse HEAD)" ``` Ran this script first on `main`, then with the updated `package.json` & `package-lock.json`. Used `git` to diff the `baseline-compare` changes. Confirmed they looked harmless.
- Loading branch information
1 parent
36a4593
commit b43f3f4
Showing
54 changed files
with
1,048 additions
and
1,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.