Bundle yarn.js with workspaces foreach support#109
Conversation
|
Before CI confirms that the |
|
And After CI confirms that the |
@yarnpkg/plugin-workspace-tools plugin in vendored yarn.jsyarn.js with workspaces foreach support
|
@bollwyvl On the My understanding is that it should be an npm package, since npm install -g @jupyter/jlpmand get the What I'm less clear about is the integration with pip install jupyter-builderHow would that work if Would we still need a small Python wrapper/package that vendors or downloads I'm a bit unsure about the packaging story here and how the pieces are expected to fit together if we publish Could you please provide a bit more context on the intended approach so I can look into it further ? |
|
Right in one approach;
There might be a compelling reason for |
|
Should we track the "seperation of |
There was a problem hiding this comment.
Pull request overview
This PR vendors a custom-built Yarn Berry yarn.js (v3.5.0) with @yarnpkg/plugin-workspace-tools included so downstream projects can use yarn workspaces foreach (via jlpm) without additional plugin configuration, and adds CI checks to validate the bundle and downstream behavior.
Changes:
- Add a new CI workflow that rebuilds Yarn Berry at
@yarnpkg/cli/3.5.0, bakes in@yarnpkg/plugin-workspace-tools, smoke-testsworkspaces foreach, and SHA-compares the rebuiltyarn.jsagainst the vendored one. - Add a downstream CI step intended to validate
jlpm workspaces foreachin real downstream repos. - Update downstream artifact upload action version.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/verify-yarn-bundle.yml | New workflow to reproducibly rebuild and hash-verify the vendored yarn.js and smoke-test workspaces foreach. |
| .github/workflows/downstream-tests.yml | Adds a downstream jlpm workspaces foreach step and updates artifact upload action usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Test `jlpm workspaces foreach` command | ||
| working-directory: downstream | ||
| continue-on-error: true | ||
| run: | |
There was a problem hiding this comment.
Actually it even fails now in jupyterlab (See CI Logs). We'll change this once we fix it upstream.
Fixes #104
Description
Builds a custom
yarn.js(v3.5.0) with@yarnpkg/plugin-workspace-toolsbaked in, soyarn workspaces foreachworks out of the box in downstream projects without any extra plugin setup.How
yarn.jswas generated@yarnpkg/cli/3.5.0branch from the Yarn Berry repo@yarnpkg/plugin-workspace-toolstopackages/yarnpkg-cli/package.json(dependency + standard bundle profile)yarn workspace @yarnpkg/cli build:cli --no-git-hashjupyter_builder/yarn.jswith the generated artifactVerification
Added a small step in CI in Downstream Tests to check whether
yarn workspace foreach <some_command>works or not.