Skip to content

Commit

Permalink
Removing ts-node in favor of tsx, ensure CJS/ESM by file extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Dec 19, 2023
1 parent ac12c1a commit b6d5e2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
File renamed without changes.
8 changes: 8 additions & 0 deletions test/index.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import assert from 'node:assert';
import { oas31 } from 'openapi3-ts';
import { OpenApiBuilder } from 'openapi3-ts/oas31';

const builder1 = new oas31.OpenApiBuilder();
assert.ok(typeof builder1.rootDoc === 'object');
const builder2 = new OpenApiBuilder();
assert.ok(typeof builder2.rootDoc === 'object');
9 changes: 4 additions & 5 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"scripts": {
"test:cjs": "node index.cjs",
"test:mjs": "node index.mjs",
"test:ts": "ts-node --project fixture/tsconfig.node.json index.ts",
"test:ts-esm": "tsx --tsconfig fixture/tsconfig.node.json index.ts",
"test:ts-node16": "ts-node --project fixture/tsconfig.node16.json index.ts",
"test:ts-esm-node16": "tsx --tsconfig fixture/tsconfig.node16.json index.ts"
"test:ts": "tsx --tsconfig fixture/tsconfig.node.json index.cts",
"test:ts-esm": "tsx --tsconfig fixture/tsconfig.node.json index.mts",
"test:ts-node16": "tsx --tsconfig fixture/tsconfig.node16.json index.cts",
"test:ts-esm-node16": "tsx --tsconfig fixture/tsconfig.node16.json index.mts"
},
"dependencies": {
"openapi3-ts": "file:.."
},
"devDependencies": {
"ts-node": "^10.9.1",
"tsx": "^4.6.2"
}
}

0 comments on commit b6d5e2d

Please sign in to comment.