mirror of https://github.com/aminya/setup-cpp
fix: add support for Es modules
This commit is contained in:
parent
2c84fbf623
commit
ae4effdd67
|
@ -26,6 +26,7 @@ words:
|
|||
- devel
|
||||
- dyld
|
||||
- eabi
|
||||
- esmodule
|
||||
- execa
|
||||
- ftxui
|
||||
- gcovr
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,7 @@
|
|||
module.exports = {
|
||||
preset: "ts-jest/presets/default-esm",
|
||||
preset: "ts-jest/presets/js-with-ts-esm",
|
||||
extensionsToTreatAsEsm: [".ts"],
|
||||
transformIgnorePatterns: [], // transform everything
|
||||
testEnvironment: "node",
|
||||
testMatch: ["**/*.test.ts"],
|
||||
testPathIgnorePatterns: ["<rootDir>/src/python/setup-python/"],
|
||||
|
|
14
package.json
14
package.json
|
@ -5,7 +5,12 @@
|
|||
"repository": "https://github.com/aminya/setup-cpp",
|
||||
"license": "Apache-2.0",
|
||||
"author": "Amin Yahyaabadi",
|
||||
"exports": {
|
||||
"import": "./dist/setup-cpp.mjs",
|
||||
"require": "./dist/setup-cpp.js"
|
||||
},
|
||||
"main": "./dist/setup_cpp.js",
|
||||
"module": "./dist/setup_cpp.mjs",
|
||||
"source": "./src/main.ts",
|
||||
"bin": {
|
||||
"setup-cpp": "./dist/setup_cpp.js",
|
||||
|
@ -121,7 +126,14 @@
|
|||
"main": {
|
||||
"context": "node",
|
||||
"includeNodeModules": true,
|
||||
"optimize": true
|
||||
"optimize": true,
|
||||
"outputFormat": "commonjs"
|
||||
},
|
||||
"module": {
|
||||
"context": "node",
|
||||
"includeNodeModules": true,
|
||||
"optimize": true,
|
||||
"outputFormat": "esmodule"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true,
|
||||
"module": "commonjs",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": false,
|
||||
"outDir": "./dist"
|
||||
|
|
Loading…
Reference in New Issue