Skip to content

chore(build): Set "type": "commonjs" in dist/package.json#8097

Merged
cpcallen merged 1 commit intoRaspberryPiFoundation:rc/v11.0.0from
cpcallen:chore/type-commonjs
May 13, 2024
Merged

chore(build): Set "type": "commonjs" in dist/package.json#8097
cpcallen merged 1 commit intoRaspberryPiFoundation:rc/v11.0.0from
cpcallen:chore/type-commonjs

Conversation

@cpcallen
Copy link
Copy Markdown
Collaborator

The basics

The details

Proposed Changes

Set "type": "commonjs" in the generated dist/package.json file, since the .js files in the package root are CJS. This should be a no-op since that's the default, but by setting it explicitly we ensure that any change to the repository top-level package.json to set "type": "module" won't break the published package accidentally.

Reason for Changes

As described this should be a no-op, but by publishing it now in v11 it will help discover any compatibility issues with 3rd party build tools that might change how the process the package when it is present.

Test Coverage

  • Passes npm test
  • Passes npm test in blockly-samples when linked against a dist/ build with this change.
  • Passes manual test of importing and requiring blockly in node.js.

No changes to manual test procedures needed.

As described this should be a no-op, but by publishing it now
in v11 it will help discover any compatibility issues with 3rd
party build tools that might change how the process the package
when it is present.
@cpcallen cpcallen added component: build process PR: chore General chores (dependencies, typos, etc) labels May 13, 2024
@cpcallen cpcallen requested a review from maribethb May 13, 2024 17:53
@cpcallen cpcallen requested a review from a team as a code owner May 13, 2024 17:53
@github-actions github-actions Bot added PR: chore General chores (dependencies, typos, etc) and removed PR: chore General chores (dependencies, typos, etc) labels May 13, 2024
@cpcallen cpcallen enabled auto-merge (squash) May 13, 2024 17:54
@cpcallen cpcallen merged commit 59584c3 into RaspberryPiFoundation:rc/v11.0.0 May 13, 2024
@cpcallen cpcallen deleted the chore/type-commonjs branch May 20, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: build process PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants