Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"compile:esm": "tsc -b ./tsconfig.esm.json && mve out/esm/main.js out/esm/main.mjs && node -e \"require('fs').writeFileSync('out/esm/package.json', '{\\\"type\\\":\\\"module\\\"}')\"",
"compile:cjs": "tsc -b ./tsconfig.cjs.json && mve out/cjs/main.js out/cjs/main.cjs",
"clean": "node -e \"const fs = require('fs'); fs.rmSync('./out', { recursive: true, force: true });\"",
"test": "npm run test:package",
"test:package": "node ./scripts/test-package.cjs"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion api/scripts/test-package.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ try {
testRoot,
);

const typescriptCli = path.join(packageRoot, 'node_modules', 'typescript', 'bin', 'tsc');
const packageRequire = createRequire(path.join(packageRoot, 'package.json'));
const typescriptCli = packageRequire.resolve('typescript/bin/tsc');
const fixtureRoot = path.join(packageRoot, 'test');

for (const consumer of [
Expand Down
4 changes: 3 additions & 1 deletion api/test/tsconfig.legacy.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"moduleResolution": "Node",
"noEmit": true,
"strict": true,
"skipLibCheck": false
"skipLibCheck": false,
"types": ["node", "vscode"],
"typeRoots": ["../node_modules/@types"]
},
"include": ["consumer.ts"]
}
4 changes: 3 additions & 1 deletion api/test/tsconfig.modern.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"moduleResolution": "NodeNext",
"noEmit": true,
"strict": true,
"skipLibCheck": false
"skipLibCheck": false,
"types": ["node", "vscode"],
"typeRoots": ["../node_modules/@types"]
},
"include": ["consumer.ts"]
}