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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"editor.formatOnSave": true,
"[typescript]": {
"[typescript][json][jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
Expand Down
16 changes: 13 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@
"API",
"Environments"
],
"main": "./out/main.js",
"types": "./out/main.d.ts",
"exports": {
"import": {
"types": "./out/esm/main.d.ts",
"default": "./out/esm/main.js"
},
"require": {
"types": "./out/cjs/main.d.ts",
"default": "./out/cjs/main.js"
}
},
"engines": {
"node": ">=22.21.1",
"vscode": "^1.110.0"
Expand All @@ -30,7 +38,9 @@
"prepublishOnly": "echo \"⛔ Can only publish from a secure pipeline ⛔\" && node -e \"process.exitCode = 1\"",
"prepack": "npm run all:publish",
"all:publish": "git clean -xfd . && npm install && npm run compile",
"compile": "tsc -b ./tsconfig.json",
"compile": "npm run compile:cjs && npm run compile:esm",
"compile:cjs": "tsc -b ./tsconfig.cjs.json",
"compile:esm": "tsc -b ./tsconfig.esm.json",
"clean": "node -e \"const fs = require('fs'); fs.rmSync('./out', { recursive: true, force: true });\""
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions api/tsconfig.json → api/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"lib": ["ES2020"],
"declaration": true,
"strict": true,
"outDir": "./out",
"rootDir": "src",
"esModuleInterop": true,
"skipLibCheck": true,
Expand Down
7 changes: 7 additions & 0 deletions api/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "./out/cjs"
}
}
7 changes: 7 additions & 0 deletions api/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "esnext",
"outDir": "./out/esm"
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@
"python-envs.workspaceSearchPaths": {
"type": "array",
"description": "%python-envs.workspaceSearchPaths.description%",
"default": [".venv", "*/.venv"],
"default": [
".venv",
"*/.venv"
],
"scope": "resource",
"items": {
"type": "string"
Expand Down