Skip to content

Commit 19af193

Browse files
authored
Update node dependencies & generate bundled JavaScript files (#6720)
* Update package.json to work for recent version of node Doing an `npm install` in `cirq-web/cirq_ts` failed due to a dependency being impossible to reconcile. Specifically, the constraints on the version of `ts-mocha` specified in file `cirq-web/cirq_ts/package.json` could not be reconciled with the constraints that arose from another package required by `package.json`. Increasing the minimum version of `ts-mocha` made it possible to run `npm install`. Note: on Apple Silicon machines and MacOS, the `canvas` package will fail to install because of missing dependencies unless you install the Cairo package. Here is an example installation command using Homebrew: ``` brew install pkg-config cairo pango libpng jpeg giflib librsvg ``` This must be done before running `npm install`. (Tested on MacOS 14.6.1.) * Update package-lock.json to go with updated package.json This package-lock.json file is what resulted after running `npm install`, after making the change to `package.json` to increase the version of `ts-mocha`. * Update distributed versions of .js files These are the files produced by running ``` npx webpack --mode production ``` as described in the section on _Creating visualization bundle files_ in the subdirectory `cirq-web/cirq-ts`. * Update version of node used in ci.yml The file `ci.yml` had specified Node version 14, which is very old; GitHub officially deprecated version 16 in 2023 (c.f. https://nodejs.org/en/blog/announcements/nodejs16-eol). This commit updates `ci.yml` to use version 20.17.0, which is the current LTS version.
1 parent f56a799 commit 19af193

File tree

5 files changed

+12558
-8405
lines changed

5 files changed

+12558
-8405
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ jobs:
329329
- uses: actions/checkout@v4
330330
- uses: actions/setup-node@v4
331331
with:
332-
node-version: '14.16.1'
332+
node-version: '20.17.0'
333333
- name: Install npm
334334
run: check/npm ci
335335
- name: Check build matches the current
@@ -341,7 +341,7 @@ jobs:
341341
- uses: actions/checkout@v4
342342
- uses: actions/setup-node@v4
343343
with:
344-
node-version: '14.16.1'
344+
node-version: '20.17.0'
345345
- name: Install npm
346346
run: check/npm ci
347347
- name: Lint
@@ -353,7 +353,7 @@ jobs:
353353
- uses: actions/checkout@v4
354354
- uses: actions/setup-node@v4
355355
with:
356-
node-version: '14.16.1'
356+
node-version: '20.17.0'
357357
- name: Install npm dependencies
358358
run: check/npm ci
359359
- name: Unit tests
@@ -367,7 +367,7 @@ jobs:
367367
- uses: actions/checkout@v4
368368
- uses: actions/setup-node@v4
369369
with:
370-
node-version: '14.16.1'
370+
node-version: '20.17.0'
371371
- name: Install npm dependencies
372372
run: check/npm ci
373373
- name: Test

cirq-web/cirq_ts/dist/bloch_sphere.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cirq-web/cirq_ts/dist/circuit.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)