diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe44c7f80f..5f4b2694b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,6 @@ jobs: restore-keys: | ${{ runner.os }}-pip-${{ matrix.python }} - - name: Update yarn - run: npm install --global yarn@^3 - - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" @@ -50,9 +47,9 @@ jobs: python -m pip install jupyter_packaging~=0.7.9 - name: Build the extension run: | - yarn install --frozen-lockfile - yarn run build - yarn run build:examples + jlpm install --frozen-lockfile + jlpm run build + jlpm run build:examples # First install the dev jupyterlab_widgets, since it is a dependency pushd jupyterlab_widgets @@ -70,17 +67,17 @@ jobs: - name: Run JS tests run: | pushd packages/base - yarn run test:unit:firefox:headless + jlpm run test:unit:firefox:headless popd pushd packages/controls - yarn run test:unit:firefox:headless + jlpm run test:unit:firefox:headless popd pushd packages/html-manager - yarn run test:unit:firefox:headless + jlpm run test:unit:firefox:headless popd pushd examples/web1 - yarn run test:firefox:headless + jlpm run test:firefox:headless popd diff --git a/dev-install.sh b/dev-install.sh index eb70ae107b..4b95f4040b 100755 --- a/dev-install.sh +++ b/dev-install.sh @@ -20,7 +20,7 @@ if [ $? -ne 0 ]; then exit 1 fi -echo -n "Checking JupyterLab (assuming JupyterLab >=3)... " +echo -n "Checking JupyterLab (assuming JupyterLab >=4)... " jupyter lab --version 2>/dev/null if [ $? -ne 0 ]; then echo "no, skipping installation of widgets for jupyterlab" @@ -34,8 +34,8 @@ set -e nbExtFlags="--sys-prefix $1" echo -n "Installing and building all yarn packages" -yarn install -yarn run build +jlpm install +jlpm run build echo -n "widgetsnbextension" cd widgetsnbextension diff --git a/docs/source/dev_install.md b/docs/source/dev_install.md index 4ade00637f..f0e5a60538 100644 --- a/docs/source/dev_install.md +++ b/docs/source/dev_install.md @@ -17,12 +17,12 @@ To install ipywidgets from git, you will need: version of the notebook, checkout the appropriate tag. + See the [Compatibility table](https://github.com/jupyter-widgets/ipywidgets#compatibility) - + - the latest [JupyterLab release](https://github.com/jupyterlab/jupyterlab/releases) -### Installing With Conda +### Installing With Conda ```bash conda create -c conda-forge -n ipywidgets yarn notebook @@ -41,10 +41,10 @@ Rebuilding after making changes To build and test changes, run the following commands in the ipywidgets repository root directory, empty your browser's cache, and refresh the page. - yarn run clean - yarn run build + jlpm run clean + jlpm run build -If your changes are confined to one package (for example, just in the widgetsnbextension package), then it may be sufficient to just run `yarn run build` in that specific directory. +If your changes are confined to one package (for example, just in the widgetsnbextension package), then it may be sufficient to just run `jlpm run build` in that specific directory. Tips and troubleshooting ------------------------ diff --git a/docs/source/dev_release.md b/docs/source/dev_release.md index ce347b3fdd..9c46d97716 100644 --- a/docs/source/dev_release.md +++ b/docs/source/dev_release.md @@ -47,8 +47,8 @@ git checkout 7.x git pull origin 7.x git reset --hard origin/7.x git clean -fdx -yarn install -yarn run publish +jlpm install +npm publish ``` Lerna will prompt you for version numbers for each of the changed npm packages. Lerna will then change the versions appropriately (including the interdependency versions), commit, tag, and publish the new packages to npm. diff --git a/docs/source/dev_testing.md b/docs/source/dev_testing.md index 11021a8920..8c9d6ee68d 100644 --- a/docs/source/dev_testing.md +++ b/docs/source/dev_testing.md @@ -7,6 +7,6 @@ To run the Python tests: To run the Javascript tests in each package directory: - yarn test + jlpm test This will run the test suite using `karma` with 'debug' level logging. diff --git a/examples/web1/package.json b/examples/web1/package.json index ab53557126..b13fa902ce 100644 --- a/examples/web1/package.json +++ b/examples/web1/package.json @@ -9,11 +9,11 @@ "scripts": { "build": "webpack", "clean": "rimraf built", - "test": "npm run test:firefox && npm run test:chrome", - "test:chrome": "npm run test:default", + "test": "jlpm run test:firefox && jlpm run test:chrome", + "test:chrome": "jlpm run test:default", "test:default": "karma start karma.config.js --log-level debug", - "test:firefox": "npm run test:default -- --browsers Firefox", - "test:firefox:headless": "npm run test:default -- --browsers FirefoxHeadless" + "test:firefox": "jlpm run test:default -- --browsers Firefox", + "test:firefox:headless": "jlpm run test:default -- --browsers FirefoxHeadless" }, "dependencies": { "@jupyter-widgets/base": "^4.1.6", diff --git a/examples/web2/package.json b/examples/web2/package.json index 5bd9799f2d..6961062d82 100644 --- a/examples/web2/package.json +++ b/examples/web2/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "webpack", "clean": "rimraf built", - "test": "npm run test:default", + "test": "jlpm run test:default", "test:default": "echo \"No test specified\"" }, "dependencies": { diff --git a/examples/web3/package.json b/examples/web3/package.json index 303121ae64..af6830739c 100644 --- a/examples/web3/package.json +++ b/examples/web3/package.json @@ -7,11 +7,11 @@ "author": "IPython", "main": "lib/index.js", "scripts": { - "build": "npm run clean && tsc && node scripts/copyfiles.js && webpack", + "build": "jlpm run clean && tsc && node scripts/copyfiles.js && webpack", "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo && rimraf built", "host": "http-server", "lint": "tslint --project tslint.json --format stylish", - "test": "npm run test:default", + "test": "jlpm run test:default", "test:default": "echo \"No test specified\"" }, "dependencies": { diff --git a/examples/web4/package.json b/examples/web4/package.json index 5ff6c3aa57..2c38165208 100644 --- a/examples/web4/package.json +++ b/examples/web4/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "webpack", "clean": "rimraf built", - "test": "npm run test:default", + "test": "jlpm run test:default", "test:default": "echo \"No test specified\"" }, "dependencies": { diff --git a/lerna.json b/lerna.json index 93ff5f1323..d016d5000d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "3.2.1", - "npmClient": "yarn", + "npmClient": "jlpm", "useWorkspaces": true, "version": "independent" } diff --git a/packages/base/package.json b/packages/base/package.json index bc6816efe4..e5a0699fae 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -16,22 +16,22 @@ "css/*.css" ], "scripts": { - "build": "npm run build:src", + "build": "jlpm run build:src", "build:src": "tsc", "build:test": "tsc --project test && webpack --config test/webpack.conf.js", - "clean": "npm run clean:src", + "clean": "jlpm run clean:src", "clean:src": "rimraf lib && rimraf tsconfig.tsbuildinfo", "lint": "tslint --project tslint.json --format stylish", - "prepublish": "npm run clean && npm run build", - "test": "npm run test:unit", - "test:coverage": "npm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js", - "test:unit": "npm run test:unit:firefox && npm run test:unit:chrome", - "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", - "test:unit:chrome:debug": "npm run test:unit:default -- --browsers=Chrome --single-run=false", - "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug", - "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", - "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless", - "test:unit:ie": "npm run test:unit:default -- --browsers=IE" + "prepublish": "jlpm run clean && jlpm run build", + "test": "jlpm run test:unit", + "test:coverage": "jlpm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js", + "test:unit": "jlpm run test:unit:firefox && jlpm run test:unit:chrome", + "test:unit:chrome": "jlpm run test:unit:default -- --browsers=Chrome", + "test:unit:chrome:debug": "jlpm run test:unit:default -- --browsers=Chrome --single-run=false", + "test:unit:default": "jlpm run build:test && karma start test/karma.conf.js --log-level debug", + "test:unit:firefox": "jlpm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "jlpm run test:unit:default -- --browsers=FirefoxHeadless", + "test:unit:ie": "jlpm run test:unit:default -- --browsers=IE" }, "dependencies": { "@jupyterlab/services": "^6 || ^7", diff --git a/packages/controls/package.json b/packages/controls/package.json index 0717a00382..cb887ee6d0 100644 --- a/packages/controls/package.json +++ b/packages/controls/package.json @@ -17,22 +17,22 @@ "dist/" ], "scripts": { - "build": "npm run build:src && npm run build:css", + "build": "jlpm run build:src && jlpm run build:css", "build:css": "postcss --use postcss-import --use postcss-cssnext -o css/widgets.built.css css/widgets.css", "build:src": "tsc", "build:test": "tsc --project test && webpack --config test/webpack.conf.js", - "clean": "npm run clean:src", + "clean": "jlpm run clean:src", "clean:src": "rimraf lib && rimraf tsconfig.tsbuildinfo", "lint": "tslint --project tslint.json --format stylish", - "prepublish": "npm run clean && npm run build", - "test": "npm run test:unit", - "test:coverage": "npm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js", - "test:unit": "npm run test:unit:firefox && npm run test:unit:chrome", - "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", - "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug", - "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", - "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless", - "test:unit:ie": "npm run test:unit:default -- --browsers=IE" + "prepublish": "jlpm run clean && jlpm run build", + "test": "jlpm run test:unit", + "test:coverage": "jlpm run build:test && webpack --config test/webpack-cov.conf.js && karma start test/karma-cov.conf.js", + "test:unit": "jlpm run test:unit:firefox && jlpm run test:unit:chrome", + "test:unit:chrome": "jlpm run test:unit:default -- --browsers=Chrome", + "test:unit:default": "jlpm run build:test && karma start test/karma.conf.js --log-level debug", + "test:unit:firefox": "jlpm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "jlpm run test:unit:default -- --browsers=FirefoxHeadless", + "test:unit:ie": "jlpm run test:unit:default -- --browsers=IE" }, "dependencies": { "@jupyter-widgets/base": "^4.1.6", diff --git a/packages/html-manager/package.json b/packages/html-manager/package.json index b2d10c6e5a..61556a5311 100644 --- a/packages/html-manager/package.json +++ b/packages/html-manager/package.json @@ -21,19 +21,19 @@ "css/*.css" ], "scripts": { - "build": "npm run build:src && webpack && npm run build:embed-amd", + "build": "jlpm run build:src && webpack && jlpm run build:embed-amd", "build:embed-amd": "node scripts/concat-amd-build.js && rimraf dist/amd", "build:src": "tsc", "build:test": "tsc --project test && webpack --config test/webpack.conf.js", "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo && rimraf dist", "lint": "tslint --project tslint.json --format stylish", - "prepublish": "npm run clean && npm run build", - "test": "npm run test:unit", - "test:unit": "npm run test:unit:firefox && npm run test:unit:chrome", - "test:unit:chrome": "npm run test:unit:default -- --browsers=Chrome", - "test:unit:default": "npm run build:test && karma start test/karma.conf.js --log-level debug --browsers=Firefox", - "test:unit:firefox": "npm run test:unit:default -- --browsers=Firefox", - "test:unit:firefox:headless": "npm run test:unit:default -- --browsers=FirefoxHeadless" + "prepublish": "jlpm run clean && jlpm run build", + "test": "jlpm run test:unit", + "test:unit": "jlpm run test:unit:firefox && jlpm run test:unit:chrome", + "test:unit:chrome": "jlpm run test:unit:default -- --browsers=Chrome", + "test:unit:default": "jlpm run build:test && karma start test/karma.conf.js --log-level debug --browsers=Firefox", + "test:unit:firefox": "jlpm run test:unit:default -- --browsers=Firefox", + "test:unit:firefox:headless": "jlpm run test:unit:default -- --browsers=FirefoxHeadless" }, "dependencies": { "@jupyter-widgets/base": "^4.1.6", diff --git a/packages/output/package.json b/packages/output/package.json index ddd22a8db1..d50dc4f769 100644 --- a/packages/output/package.json +++ b/packages/output/package.json @@ -18,11 +18,11 @@ "main": "lib/index.js", "typings": "lib/index.d.ts", "scripts": { - "build": "npm run build:src", + "build": "jlpm run build:src", "build:src": "tsc", "clean": "rimraf lib && rimraf tsconfig.tsbuildinfo", "lint": "tslint --project tslint.json --format stylish", - "prepublish": "npm run clean && npm run build", + "prepublish": "jlpm run clean && jlpm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { diff --git a/scripts/travis_install_js.sh b/scripts/travis_install_js.sh index 077bd3349c..234279f461 100644 --- a/scripts/travis_install_js.sh +++ b/scripts/travis_install_js.sh @@ -1,5 +1,5 @@ echo `yarn -v` echo `node -v` -yarn -yarn run build -yarn run build:examples +jlpm +jlpm run build +jlpm run build:examples diff --git a/scripts/travis_script_js.sh b/scripts/travis_script_js.sh index 232e00fac5..edc8dd393b 100644 --- a/scripts/travis_script_js.sh +++ b/scripts/travis_script_js.sh @@ -1,23 +1,23 @@ set -ex export CHROME_BIN=chromium-browser -yarn run integrity +jlpm run integrity cd packages cd base -yarn run test:unit:$BROWSER +jlpm run test:unit:$BROWSER cd .. cd controls -yarn run test:unit:$BROWSER +jlpm run test:unit:$BROWSER cd .. cd html-manager -yarn run test:unit:$BROWSER +jlpm run test:unit:$BROWSER cd .. cd .. cd examples/web1 -yarn run test:firefox +jlpm run test:firefox cd ../.. diff --git a/widgetsnbextension/package.json b/widgetsnbextension/package.json index 8e0865b305..185995f6b3 100644 --- a/widgetsnbextension/package.json +++ b/widgetsnbextension/package.json @@ -17,7 +17,7 @@ "scripts": { "build": "webpack", "clean": "rimraf widgetsnbextension/static", - "prepublish": "npm run clean && npm run build", + "prepublish": "jlpm run clean && jlpm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": {