-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Move type:module
declaration into package.json.
#4355
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Slightly surprisingly, the symlink is enough to make `node switch_package_to_release.js` work.
Again, declare this as commonjs
matrix-js-sdk is built into ECMAScript modules, and we should declare it as such. See https://nodejs.org/api/packages.html#type. Failure to do so causes problems for javascript projects attempting to build against matrix-js-sdk: see #4347. Previously, we did this as part of the package.json switcheroo, but that is unnecessarily fragile. matrix-react-sdk, element-web, etc are unaffected by this, because they use the typescript files directly, by importing `matrix-js-sdk/src/...`.
richvdh
force-pushed
the
rav/kill_package_switcheroo/module_type
branch
from
August 20, 2024 14:47
2fed5b6
to
bc0f8c4
Compare
richvdh
commented
Aug 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github fails to show this, but this is a symlink
dbkr
approved these changes
Aug 20, 2024
richvdh
added a commit
that referenced
this pull request
Aug 20, 2024
Fix tests failing as a result of #4355. This wasn't detected in CI because the slowReporter is only enabled when building against develop.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 20, 2024
Fix tests failing as a result of #4355. This wasn't detected in CI because the slowReporter is only enabled when building against develop.
RiotRobot
pushed a commit
that referenced
this pull request
Aug 21, 2024
dbkr
added
the
backport staging
Label to automatically backport PR to staging branch
label
Aug 21, 2024
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-staging staging
# Navigate to the new working tree
cd .worktrees/backport-staging
# Create a new branch
git switch --create backport-4355-to-staging
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b8e8b143751d61b710ff6df33ec69f09cccf3adf
# Push it to GitHub
git push --set-upstream origin backport-4355-to-staging
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-staging Then, create a pull request where the |
dbkr
pushed a commit
that referenced
this pull request
Aug 21, 2024
* Rename `switch_package_to_release.js` to `.cjs` Slightly surprisingly, the symlink is enough to make `node switch_package_to_release.js` work. * Rename .eslintrc.js to .cjs Again, declare this as commonjs * Move `type:module` declaration into package.json. matrix-js-sdk is built into ECMAScript modules, and we should declare it as such. See https://nodejs.org/api/packages.html#type. Failure to do so causes problems for javascript projects attempting to build against matrix-js-sdk: see #4347. Previously, we did this as part of the package.json switcheroo, but that is unnecessarily fragile. matrix-react-sdk, element-web, etc are unaffected by this, because they use the typescript files directly, by importing `matrix-js-sdk/src/...`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport staging
Label to automatically backport PR to staging branch
T-Task
Tasks for the team like planning
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
matrix-js-sdk is built into ECMAScript modules, and we should declare it as such. See https://nodejs.org/api/packages.html#type. Failure to do so causes problems for javascript projects attempting to build against matrix-js-sdk: see #4347.
Previously, we did this as part of the package.json switcheroo, but that is unnecessarily fragile.
matrix-react-sdk, element-web, etc are unaffected by this, because they use the typescript files directly, by importing
matrix-js-sdk/src/...
.Before we can make the switch, we need to rename a couple of commonjs scripts.