-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix!: Convert project to output ESM #110
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ | |
| "url": "git+https://github.com/microcks/microcks-testcontainers-node.git" | ||
| }, | ||
| "license": "Apache-2.0", | ||
| "main": "build/index.js", | ||
| "exports": "./build/index.js", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
|
|
@@ -23,7 +23,8 @@ | |
| "test": "cross-env DEBUG=testcontainers* NODE_OPTIONS='--experimental-vm-modules' jest" | ||
| }, | ||
| "dependencies": { | ||
| "testcontainers": "10.16.0" | ||
| "testcontainers": "10.16.0", | ||
| "ts-jest-resolver": "^2.0.1" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this one be in |
||
| }, | ||
| "devDependencies": { | ||
| "@aws-sdk/client-sqs": "3.398.0", | ||
|
|
@@ -46,6 +47,6 @@ | |
| "build" | ||
| ], | ||
| "engines": { | ||
| "node": ">= 16" | ||
| "node": ">= 20" | ||
|
lbroudoux marked this conversation as resolved.
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,6 @@ | |
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| export * from "./microcks-container"; | ||
| export * from "./microcks-containers-ensemble"; | ||
| export * from "./microcks-async-minion-container"; | ||
| export * from "./microcks-container.js"; | ||
| export * from "./microcks-containers-ensemble.js"; | ||
| export * from "./microcks-async-minion-container.js"; | ||
|
Comment on lines
+16
to
+18
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we have to reference the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, even though it's typescript:
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,11 @@ | |
| "compilerOptions": { | ||
| "incremental": true, | ||
| "target": "es2022", | ||
| "module": "commonjs", | ||
| "module": "nodenext", | ||
| "declaration": true, | ||
| "sourceMap": true, | ||
| "strict": true, | ||
| "moduleResolution": "node", | ||
| "moduleResolution": "nodenext", | ||
|
Comment on lines
+5
to
+9
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are actually recommendations from testcontainers (see https://github.com/testcontainers/testcontainers-node/blob/main/tsconfig.base.json). What is the impact of changing these?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When looking at the testcontainers project, I'm afraid they're having the same issue. Also looks like they attempted to convert to ESM a while back, but closed the PR without any reasoning: testcontainers/testcontainers-node#406 I don't have much time to look into this, and it's not a critical issue. We can just continue to use an old version, but it would be nice for others if you either revert the module change in package.json or continue with the change to a proper ESM module. The module type in package.json is looked up at runtime, and type "module" tells the JS host (Node.js) that the javascript in this project is using |
||
| "esModuleInterop": true, | ||
| "skipLibCheck": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.