Skip to content

Commit dad574e

Browse files
committed
feat(esm): welp, ESM is not ready for real world usage yet
BREAKING CHANGE: maybe I'll try again in 6 months. Jest and eslint cannot handle it now
1 parent a2bc98f commit dad574e

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ tsconfig.build.json
6464
jest.config.cjs
6565
.prettierrc.cjs
6666
.eslintrc.cjs
67+
jest.config.js
68+
.prettierrc.js
69+
.eslintrc.js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@types/node": "^18.16.14",
4444
"@typescript-eslint/eslint-plugin": "^5.59.7",
4545
"@typescript-eslint/parser": "^5.59.7",
46-
"coconfig": "^0.9.2",
46+
"coconfig": "^0.10.1",
4747
"eslint": "^8.41.0",
4848
"eslint-config-prettier": "^8.8.0",
4949
"eslint-plugin-import": "^2.27.5",

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ interface OtiCoConfig {
1414
'.npmignore': string,
1515
'tsconfig.json': CoConfigPassthroughEntry<typeof tsconfig>,
1616
'tsconfig.build.json': CoConfigPassthroughEntry<typeof tsconfigBuild>,
17-
'jest.config.cjs': CoConfigPassthroughEntry,
18-
'.prettierrc.cjs': CoConfigPassthroughEntry,
19-
'.eslintrc.cjs': CoConfigPassthroughEntry,
17+
'jest.config.js': CoConfigPassthroughEntry,
18+
'.prettierrc.js': CoConfigPassthroughEntry,
19+
'.eslintrc.js': CoConfigPassthroughEntry,
2020
'.commitlintrc.json': CoConfigPassthroughEntry,
2121
}
2222

@@ -25,8 +25,8 @@ export const config: OtiCoConfig = {
2525
'.npmignore': fs.readFileSync(path.resolve(__dirname, '../templates/npmignore'), 'utf8'),
2626
'tsconfig.json': { configuration: tsconfig, stringify: true },
2727
'tsconfig.build.json': { configuration: tsconfigBuild, stringify: true },
28-
'jest.config.cjs': { configuration: jestConfig },
29-
'.prettierrc.cjs': { configuration: prettierConfig },
30-
'.eslintrc.cjs': { configuration: eslintRc },
28+
'jest.config.js': { configuration: jestConfig },
29+
'.prettierrc.js': { configuration: prettierConfig },
30+
'.eslintrc.js': { configuration: eslintRc },
3131
'.commitlintrc.json': { configuration: commitLint, stringify: true },
3232
};

src/tsconfig.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ export const tsconfig = {
44
'ts-node': {
55
transpileOnly: true,
66
files: true,
7-
esm: true,
87
},
98
compilerOptions: {
109
lib: ['ES2022', 'DOM'],
11-
module: 'Node16',
12-
moduleResolution: 'node16',
10+
module: 'CommonJS',
11+
moduleResolution: 'NodeNext',
1312
target: 'ES2022',
1413
declaration: true,
1514
sourceMap: true,

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ __metadata:
14191419
"@types/node": ^18.16.14
14201420
"@typescript-eslint/eslint-plugin": ^5.59.7
14211421
"@typescript-eslint/parser": ^5.59.7
1422-
coconfig: ^0.9.2
1422+
coconfig: ^0.10.1
14231423
eslint: ^8.41.0
14241424
eslint-config-prettier: ^8.8.0
14251425
eslint-plugin-import: ^2.27.5
@@ -2771,9 +2771,9 @@ __metadata:
27712771
languageName: node
27722772
linkType: hard
27732773

2774-
"coconfig@npm:^0.9.2":
2775-
version: 0.9.2
2776-
resolution: "coconfig@npm:0.9.2"
2774+
"coconfig@npm:^0.10.1":
2775+
version: 0.10.1
2776+
resolution: "coconfig@npm:0.10.1"
27772777
dependencies:
27782778
dotgitignore: ^2.1.0
27792779
find-up: ^4.1.0
@@ -2785,7 +2785,7 @@ __metadata:
27852785
optional: true
27862786
bin:
27872787
coconfig: build/bin/cli.js
2788-
checksum: 2371f1d724109538c5360638f7dcab6e6105529bc7ffa1a60eed2cb5e7cc944325b07031d15acb252b36a5d5782112b6229342209910a84608da16e94e6c64a1
2788+
checksum: 085670b7d99258a342e5d94401d5082778df298dd7dd9e18e3cc5e1f8945a71ad5b9469ee4bae96b2d99967b90d04eb8cba0d945e0e13714a2575f33cef8626b
27892789
languageName: node
27902790
linkType: hard
27912791

0 commit comments

Comments
 (0)