Skip to content

Updates language-support package type and node version #495

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

Merged
merged 2 commits into from
May 5, 2025

Conversation

anderson4j
Copy link
Collaborator

@anderson4j anderson4j commented Apr 30, 2025

The problem:
Running e2e tests in the react-codemirror package fails on main with a message like:
SyntaxError: Named export 'testData' not found. The requested module '@neo4j-cypher/language-support' is a CommonJS module, which may not support all module.exports as named exports.
This testData file is part of the language-support package, and we use an ESModule import to access it in the react-codemirror tests.

The fix:
Adding "type": "module" in the package.json of language-support makes it so .js files (the ones we build with the build-esm-and-types script) are treated as ESModule instead of CommonJS.
In the build-commonjs script the output file is already .cjs instead of .js so this should not interfere with the actual CommonJS file.

The node version we were using was also a bit old, and Oskar had suggested updating it, so I shifted it to LTS.

Copy link

changeset-bot bot commented Apr 30, 2025

⚠️ No Changeset found

Latest commit: d04142c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…setting variable in-command instead of as env variable + re-allows multiple workers locally
@anderson4j anderson4j changed the title Fixes react-codemirror tests Updates language-support package type and node version May 5, 2025
@anderson4j anderson4j marked this pull request as ready for review May 5, 2025 10:03
@anderson4j anderson4j requested a review from OskarDamkjaer May 5, 2025 11:00
@anderson4j anderson4j merged commit d980a62 into main May 5, 2025
7 checks passed
@anderson4j anderson4j deleted the fixCodemirrorTests branch May 5, 2025 12:19
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