Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add lerna commands to plugins package.json #2453

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

rachel-fenichel
Copy link
Collaborator

The basics

The details

Resolves

Fixes an issue where lerna commands could not be run from the root package.json file. For instance, the build script is cd plugins && lerna run build, which was failing.

The issue was that npm run uses the contents of node-modules/.bin in the directory where it is run. The command was run at the root level, meaning that lerna was expected to be installed at the root level, but due to #2446 lerna is only installed inside examples/ and plugins.

Calling cd plugins && npm run build, with build defined as lerna run build in the plugin package.json, resolves this issue by changing which directory lerna is expected to be installed in.

Verified by running several of the changed commands from the top level, including build, deploy:prepare, and clean.

Proposed Changes

  • Add several commands to the plugins package.json file, all of which just call lerna commands.
  • Change root package.json scripts to use npm run <command> instead of lerna run <command> after changing directories.

Additional Information

I'm moderately concerned by other changes in blockly-samples passing PR checks when this was broken. What were they using for lerna? How was building and testing working?

@rachel-fenichel rachel-fenichel merged commit 5ade067 into google:master Sep 3, 2024
7 checks passed
@rachel-fenichel rachel-fenichel deleted the fix-lerna-more branch September 3, 2024 16:27
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request Sep 3, 2024
For some reason the last time we ran publish, the publish commit
7d3e23f removed all the trailing newlines from our
package-lock.json files.

In google#2453 rachel-fenichel proposes adding these files to our
.prettierignore.rc, but for now I'll just fix the files so that
the format check passes.
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request Sep 11, 2024
For some reason the last time we ran publish, the publish commit
7d3e23f removed all the trailing newlines from our
package-lock.json files.

In google#2453 rachel-fenichel proposes adding these files to our
.prettierignore.rc, but for now I'll just fix the files so that
the format check passes.
cpcallen added a commit that referenced this pull request Sep 26, 2024
* fix(field-*): Remove unneeded fieldRegistry.unregister calls

  Since FieldAngle, FieldColour and FieldMultilineInput are no longer
  in core, there's no longer any need for their corresponding plugins
  to unregister the built-in version.

* chore(deps): Restore newlines in package-lock.json files

  For some reason the last time we ran publish, the publish commit
  7d3e23f removed all the trailing newlines from our
  package-lock.json files.

  In #2453 rachel-fenichel proposes adding these files to our
  .prettierignore.rc, but for now I'll just fix the files so that
  the format check passes.

* chore(field-*): Remove unneeded uninstallBlocks test helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants