Skip to content

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 requested a review from a team as a code owner August 30, 2024 20:35
@rachel-fenichel rachel-fenichel merged commit 5ade067 into RaspberryPiFoundation:master Sep 3, 2024
@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 RaspberryPiFoundation#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 RaspberryPiFoundation#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
"postinstall": "npm run boot"
"build": "lerna run build",
"clean": "lerna run clean",
"clean:node": "lerna run clean --yes",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been lerna clean --yes.

cpcallen added a commit that referenced this pull request May 6, 2025
This was inadvertently broken by a mistranscription in PR #2453.
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 7, 2025
This was inadvertently broken by a mistranscription in PR RaspberryPiFoundation#2453.
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 8, 2025
This was inadvertently broken by a mistranscription in PR RaspberryPiFoundation#2453.
cpcallen added a commit to cpcallen/blockly-samples that referenced this pull request May 8, 2025
This was inadvertently broken by a mistranscription in PR RaspberryPiFoundation#2453.
maribethb pushed a commit that referenced this pull request May 9, 2025
…4` (#2504)

* fix: Fix clean:node script

This was inadvertently broken by a mistranscription in PR #2453.

* chore(deps): Update blockly to v12.0.0-beta.4

* fix(FieldColour): Fix type of FieldColour.prototype.isFullBlockField

Method on superclass became public in v12.0.0.

* fix(FieldMultilineInput): Use string literal instead of Field.NBSP

Workaround for removal of that constant in RaspberryPiFoundation/blockly#8738.

* fix(FieldGridDropdown): Fix type error caused by separators
gonfunko pushed a commit to gonfunko/blockly-samples that referenced this pull request May 14, 2025
This was inadvertently broken by a mistranscription in PR RaspberryPiFoundation#2453.
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