diff --git a/.tsconfigrc.js b/.tsconfigrc.js index 7a630abee..b7c1e7221 100644 --- a/.tsconfigrc.js +++ b/.tsconfigrc.js @@ -157,46 +157,73 @@ const types_publish = { const jsonrpc = { name: 'jsonrpc', path: './jsonrpc', - out: { - dir: './lib', - buildInfoFile: '${buildInfoFile}.tsbuildInfo' - }, sourceFolders: [ { path: './src/common', extends: [ common ], exclude: [ 'test' ], + out: { + dir: '../../lib${libSuffix}/common', + buildInfoFile: '../../lib${libSuffix}/common/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/common/test', extends: [ common, testMixin ], - references: [ '..' ] + references: [ '..' ], + out: { + dir: '../../../lib${libSuffix}/common/test', + buildInfoFile: '../../../lib${libSuffix}/common/test/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/browser', extends: [ browser ], exclude: [ 'test' ], - references: [ '../common' ] + references: [ '../common' ], + out: { + dir: '../../lib${libSuffix}/browser', + buildInfoFile: '../../lib${libSuffix}/browser/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/browser/test', extends: [ browser, testMixin ], - references: [ '..' ] + references: [ '..' ], + out: { + dir: '../../../lib${libSuffix}/browser/test', + buildInfoFile: '../../../lib${libSuffix}/browser/test/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/node', extends: [ node ], exclude: [ 'test' ], - references: [ '../common' ] + references: [ '../common' ], + out: { + dir: '../../lib${libSuffix}/node', + buildInfoFile: '../../lib${libSuffix}/node/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/node/test', extends: [ node, testMixin ], - references: [ '..' ] + references: [ '..' ], + out: { + dir: '../../../lib${libSuffix}/node/test', + buildInfoFile: '../../../lib${libSuffix}/node/test/${buildInfoFile}.tsbuildInfo' + } } ] }; +/** @type ProjectDescription */ +const jsonrpc_publish = { + name: 'jsonrpc_publish', + path: './jsonrpc', + references: [ './tsconfig.compat.publish.json', './tsconfig.esm.publish.json' ] +}; + /** @type ProjectDescription */ const protocol = { name: 'protocol', @@ -275,29 +302,43 @@ const server = { const client = { name: 'client', path: './client', - out: { - dir: './lib', - buildInfoFile: '${buildInfoFile}.tsbuildInfo' - }, sourceFolders: [ { path: './src/common', - extends: [ common, vscodeMixin ] + extends: [ common, vscodeMixin ], + out: { + dir: '../../lib${libSuffix}/common', + buildInfoFile: '../../lib${libSuffix}/common/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/browser', extends: [ browser, vscodeMixin ], - references: [ '../common' ] + references: [ '../common' ], + out: { + dir: '../../lib${libSuffix}/browser', + buildInfoFile: '../../lib${libSuffix}/browser/${buildInfoFile}.tsbuildInfo' + } }, { path: './src/node', extends: [ node, vscodeMixin ], - references: [ '../common' ] + references: [ '../common' ], + out: { + dir: '../../lib${libSuffix}/node', + buildInfoFile: '../../lib${libSuffix}/node/${buildInfoFile}.tsbuildInfo' + } } ], references: [ protocol ] }; +/** @type ProjectDescription */ +const client_publish = { + name: 'client_publish', + path: './client', + references: [ './tsconfig.compat.publish.json', './tsconfig.esm.publish.json' ] +}; /** @type ProjectDescription */ const client_node_tests = { @@ -375,7 +416,7 @@ const compileCompilerOptions = CompilerOptions.assign(defaultCompilerOptions, { const compileProjectOptions = { tags: ['compile'], tsconfig: 'tsconfig.json', - variables: new Map([['buildInfoFile', 'compile']]), + variables: new Map([['buildInfoFile', 'compile'], ['libSuffix', '']]), compilerOptions: compileCompilerOptions }; @@ -394,7 +435,7 @@ const watchCompilerOptions = CompilerOptions.assign(defaultCompilerOptions, { const watchProjectOptions = { tags: ['watch'], tsconfig: 'tsconfig.watch.json', - variables: new Map([['buildInfoFile', 'watch']]), + variables: new Map([['buildInfoFile', 'watch'], ['libSuffix', '']]), compilerOptions: watchCompilerOptions }; @@ -413,7 +454,15 @@ const publishCompilerOptions = CompilerOptions.assign(defaultCompilerOptions, { const publishProjectOptions = { tags: ['publish'], tsconfig: 'tsconfig.publish.json', - variables: new Map([['buildInfoFile', 'publish']]), + variables: new Map([['buildInfoFile', 'publish'], ['libSuffix', '']]), + compilerOptions: publishCompilerOptions +}; + +/** @type ProjectOptions */ +const cjsPublishProjectOptions = { + tags: ['publish'], + tsconfig: 'tsconfig.compat.publish.json', + variables: new Map([['buildInfoFile', 'publish'], ['libSuffix', '']]), compilerOptions: publishCompilerOptions }; @@ -484,20 +533,41 @@ const esmPublishProjectOptions = { compilerOptions: esmPublishCompilerOptions }; +/** @type CompilerOptions */ +const esmNodePublishCompilerOptions = CompilerOptions.assign(defaultCompilerOptions, { + composite: true, + sourceMap: false, + declarationMap: false, + noUnusedLocals: true, + noUnusedParameters: true, + target: 'es2022', + module: 'esnext', + moduleResolution: 'bundler', + lib: [ 'es2023' ] +}); + +/** @type ProjectOptions */ +const esmNodePublishProjectOptions = { + tags: ['esm', 'publish'], + tsconfig: 'tsconfig.esm.publish.json', + variables: new Map([['buildInfoFile', 'publish'], ['libSuffix', '/esm']]), + compilerOptions: esmNodePublishCompilerOptions +}; + /** @type Projects */ const projects = [ [ textDocument, [ umdProjectOptions, umdWatchProjectOptions, esmPublishProjectOptions, umdPublishProjectOptions ] ], [ textDocument_publish, [ publishProjectOptions ] ], [ types, [ umdProjectOptions, umdWatchProjectOptions, esmPublishProjectOptions, umdPublishProjectOptions ] ], [ types_publish, [ publishProjectOptions ]], - [ jsonrpc, [ compileProjectOptions, watchProjectOptions ] ], - [ createPublishProjectDescription(jsonrpc), [ publishProjectOptions ] ], + [ jsonrpc, [ compileProjectOptions, watchProjectOptions, cjsPublishProjectOptions, esmNodePublishProjectOptions ] ], + [ jsonrpc_publish, [ publishProjectOptions ] ], [ protocol, [ compileProjectOptions, watchProjectOptions ] ], [ createPublishProjectDescription(protocol), [ publishProjectOptions ] ], [ server, [ compileProjectOptions, watchProjectOptions ] ], [ createPublishProjectDescription(server), [ publishProjectOptions ] ], - [ client, [ compileProjectOptions, watchProjectOptions ] ], - [ createPublishProjectDescription(client), [ publishProjectOptions ] ], + [ client, [ compileProjectOptions, watchProjectOptions, cjsPublishProjectOptions, esmNodePublishProjectOptions ] ], + [ client_publish, [ publishProjectOptions ] ], [ client_node_tests, [ compileProjectOptions, watchProjectOptions ] ], [ createPublishProjectDescription(client_node_tests), [ publishProjectOptions ] ], [ tools, [ compileProjectOptions, watchProjectOptions ] ], diff --git a/client/package.json b/client/package.json index d7ef52f41..202e3e623 100644 --- a/client/package.json +++ b/client/package.json @@ -19,14 +19,17 @@ "exports": { ".": { "types": "./lib/common/api.d.ts", + "import": "./lib/esm/common/api.js", "default": "./lib/common/api.js" }, "./node": { "types": "./lib/node/main.d.ts", + "import": "./lib/esm/node/main.js", "node": "./lib/node/main.js" }, "./browser": { "types": "./lib/browser/main.d.ts", + "import": "./lib/esm/browser/main.js", "browser": "./lib/browser/main.js" }, "./$test/common/*": { @@ -55,8 +58,9 @@ "test": "cd ../client-node-tests && npm test && cd ../client", "clean": "rimraf lib", "all": "npm run clean && npm run compile && npm run lint && npm test", - "compile:publish": "tsc -b ./tsconfig.publish.json && shx cp src/node/terminateProcess.sh lib/node/terminateProcess.sh", - "all:publish": "git clean -xfd . && npm install && npm run updateVSCodeVersion && npm run compile:publish && npm run lint && cd ../client-node-tests && npm run all:publish && cd ..", + "compile:publish": "tsc -b ./tsconfig.compat.publish.json && shx cp src/node/terminateProcess.sh lib/node/terminateProcess.sh", + "compile:esm": "tsc -b ./tsconfig.esm.publish.json && node ../build/bin/fix-esm", + "all:publish": "git clean -xfd . && npm install && npm run updateVSCodeVersion && npm run compile:publish && npm run compile:esm && npm run lint && cd ../client-node-tests && npm run all:publish && cd ..", "preversion": "npm test", "updateVSCodeVersion": "node ./bin/updateVSCode.js", "update:vscode-version": "node ./bin/updateVSCode.js" diff --git a/client/src/browser/tsconfig.publish.json b/client/src/browser/tsconfig.compat.publish.json similarity index 86% rename from client/src/browser/tsconfig.publish.json rename to client/src/browser/tsconfig.compat.publish.json index 05507c6ad..94176ea45 100644 --- a/client/src/browser/tsconfig.publish.json +++ b/client/src/browser/tsconfig.compat.publish.json @@ -23,14 +23,15 @@ "target": "es2022", "outDir": "../../lib/browser", "tsBuildInfoFile": "../../lib/browser/publish.tsbuildInfo", - "incremental": true + "incremental": true, + "composite": true }, "include": [ "." ], "references": [ { - "path": "../common/tsconfig.publish.json" + "path": "../common/tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/client/src/browser/tsconfig.esm.publish.json b/client/src/browser/tsconfig.esm.publish.json new file mode 100644 index 000000000..502bbcd44 --- /dev/null +++ b/client/src/browser/tsconfig.esm.publish.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "types": [ + "vscode" + ], + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "lib": [ + "es2023", + "webworker" + ], + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "outDir": "../../lib/esm/browser", + "tsBuildInfoFile": "../../lib/esm/browser/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ], + "references": [ + { + "path": "../common/tsconfig.esm.publish.json" + } + ] +} diff --git a/client/src/common/tsconfig.publish.json b/client/src/common/tsconfig.compat.publish.json similarity index 99% rename from client/src/common/tsconfig.publish.json rename to client/src/common/tsconfig.compat.publish.json index df14bc5e5..69b39b756 100644 --- a/client/src/common/tsconfig.publish.json +++ b/client/src/common/tsconfig.compat.publish.json @@ -28,4 +28,4 @@ "include": [ "." ] -} \ No newline at end of file +} diff --git a/client/src/common/tsconfig.esm.publish.json b/client/src/common/tsconfig.esm.publish.json new file mode 100644 index 000000000..c1159f4f9 --- /dev/null +++ b/client/src/common/tsconfig.esm.publish.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "types": [ + "vscode" + ], + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../lib/esm/common", + "tsBuildInfoFile": "../../lib/esm/common/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ] +} diff --git a/client/src/node/main.ts b/client/src/node/main.ts index 587fe2529..99fc7b1e6 100644 --- a/client/src/node/main.ts +++ b/client/src/node/main.ts @@ -19,8 +19,8 @@ import { terminate } from './processes'; import { StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, generateRandomPipeName, createClientSocketTransport, InitializeParams} from 'vscode-languageserver-protocol/node'; // Import SemVer functions individually to avoid circular dependencies in SemVer -import semverParse = require('semver/functions/parse'); -import semverSatisfies = require('semver/functions/satisfies'); +import semverParse from 'semver/functions/parse'; +import semverSatisfies from 'semver/functions/satisfies'; export * from 'vscode-languageserver-protocol/node'; export * from '../common/api'; diff --git a/client/src/node/tsconfig.publish.json b/client/src/node/tsconfig.compat.publish.json similarity index 86% rename from client/src/node/tsconfig.publish.json rename to client/src/node/tsconfig.compat.publish.json index 4cac069ab..8ee1dcb6a 100644 --- a/client/src/node/tsconfig.publish.json +++ b/client/src/node/tsconfig.compat.publish.json @@ -23,14 +23,15 @@ ], "outDir": "../../lib/node", "tsBuildInfoFile": "../../lib/node/publish.tsbuildInfo", - "incremental": true + "incremental": true, + "composite": true }, "include": [ "." ], "references": [ { - "path": "../common/tsconfig.publish.json" + "path": "../common/tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/client/src/node/tsconfig.esm.publish.json b/client/src/node/tsconfig.esm.publish.json new file mode 100644 index 000000000..3b36c7610 --- /dev/null +++ b/client/src/node/tsconfig.esm.publish.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "types": [ + "node", + "vscode" + ], + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../lib/esm/node", + "tsBuildInfoFile": "../../lib/esm/node/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ], + "references": [ + { + "path": "../common/tsconfig.esm.publish.json" + } + ] +} diff --git a/client/tsconfig.compat.publish.json b/client/tsconfig.compat.publish.json new file mode 100644 index 000000000..0baa06190 --- /dev/null +++ b/client/tsconfig.compat.publish.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "incremental": true, + "composite": true + }, + "files": [], + "references": [ + { + "path": "./src/common/tsconfig.compat.publish.json" + }, + { + "path": "./src/browser/tsconfig.compat.publish.json" + }, + { + "path": "./src/node/tsconfig.compat.publish.json" + } + ] +} diff --git a/client/tsconfig.esm.publish.json b/client/tsconfig.esm.publish.json new file mode 100644 index 000000000..4d9b7a5e7 --- /dev/null +++ b/client/tsconfig.esm.publish.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "incremental": true, + "composite": true + }, + "files": [], + "references": [ + { + "path": "./src/common/tsconfig.esm.publish.json" + }, + { + "path": "./src/browser/tsconfig.esm.publish.json" + }, + { + "path": "./src/node/tsconfig.esm.publish.json" + } + ] +} diff --git a/client/tsconfig.publish.json b/client/tsconfig.publish.json index 1bd268e1f..212191205 100644 --- a/client/tsconfig.publish.json +++ b/client/tsconfig.publish.json @@ -6,13 +6,10 @@ "files": [], "references": [ { - "path": "./src/common/tsconfig.publish.json" + "path": "./tsconfig.compat.publish.json" }, { - "path": "./src/browser/tsconfig.publish.json" - }, - { - "path": "./src/node/tsconfig.publish.json" + "path": "./tsconfig.esm.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/package.json b/jsonrpc/package.json index ecca8e0b7..2250b6a2c 100644 --- a/jsonrpc/package.json +++ b/jsonrpc/package.json @@ -18,14 +18,17 @@ "exports": { ".": { "types": "./lib/common/api.d.ts", + "import": "./lib/esm/common/api.js", "default": "./lib/common/api.js" }, "./node": { "types": "./lib/node/main.d.ts", + "import": "./lib/esm/node/main.js", "node": "./lib/node/main.js" }, "./browser": { "types": "./lib/browser/main.d.ts", + "import": "./lib/esm/browser/main.js", "browser": "./lib/browser/main.js" } }, @@ -48,7 +51,8 @@ "webpack:test": "node ../build/bin/webpack --mode none --config ./src/browser/test/webpack.config.js", "webpack:test:silent": "node ../build/bin/webpack --no-stats --mode none --config ./src/browser/test/webpack.config.js", "all": "npm run clean && npm run compile && npm run lint && npm run test", - "compile:publish": "tsc -b ./tsconfig.publish.json", - "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run lint && npm run test" + "compile:publish": "tsc -b ./tsconfig.compat.publish.json", + "compile:esm": "tsc -b ./tsconfig.esm.publish.json && node ../build/bin/fix-esm", + "all:publish": "git clean -xfd . && npm install && npm run compile:publish && npm run compile:esm && npm run lint && npm run test" } } diff --git a/jsonrpc/src/browser/test/tsconfig.publish.json b/jsonrpc/src/browser/test/tsconfig.compat.publish.json similarity index 93% rename from jsonrpc/src/browser/test/tsconfig.publish.json rename to jsonrpc/src/browser/test/tsconfig.compat.publish.json index 6631e5d03..2801e671f 100644 --- a/jsonrpc/src/browser/test/tsconfig.publish.json +++ b/jsonrpc/src/browser/test/tsconfig.compat.publish.json @@ -30,7 +30,7 @@ ], "references": [ { - "path": "../tsconfig.publish.json" + "path": "../tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/browser/test/tsconfig.esm.publish.json b/jsonrpc/src/browser/test/tsconfig.esm.publish.json new file mode 100644 index 000000000..620948653 --- /dev/null +++ b/jsonrpc/src/browser/test/tsconfig.esm.publish.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [ + "mocha" + ], + "lib": [ + "es2023", + "webworker" + ], + "composite": true, + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "outDir": "../../../lib/esm/browser/test", + "tsBuildInfoFile": "../../../lib/esm/browser/test/publish.tsbuildInfo", + "incremental": true + }, + "include": [ + "." + ], + "references": [ + { + "path": "../tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/src/browser/tsconfig.publish.json b/jsonrpc/src/browser/tsconfig.compat.publish.json similarity index 93% rename from jsonrpc/src/browser/tsconfig.publish.json rename to jsonrpc/src/browser/tsconfig.compat.publish.json index b58151f36..64faf397c 100644 --- a/jsonrpc/src/browser/tsconfig.publish.json +++ b/jsonrpc/src/browser/tsconfig.compat.publish.json @@ -32,7 +32,7 @@ ], "references": [ { - "path": "../common/tsconfig.publish.json" + "path": "../common/tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/browser/tsconfig.esm.publish.json b/jsonrpc/src/browser/tsconfig.esm.publish.json new file mode 100644 index 000000000..87849e9e4 --- /dev/null +++ b/jsonrpc/src/browser/tsconfig.esm.publish.json @@ -0,0 +1,38 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [], + "lib": [ + "es2023", + "webworker" + ], + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "outDir": "../../lib/esm/browser", + "tsBuildInfoFile": "../../lib/esm/browser/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ], + "exclude": [ + "test" + ], + "references": [ + { + "path": "../common/tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/src/common/test/tsconfig.publish.json b/jsonrpc/src/common/test/tsconfig.compat.publish.json similarity index 93% rename from jsonrpc/src/common/test/tsconfig.publish.json rename to jsonrpc/src/common/test/tsconfig.compat.publish.json index d298d593b..937040620 100644 --- a/jsonrpc/src/common/test/tsconfig.publish.json +++ b/jsonrpc/src/common/test/tsconfig.compat.publish.json @@ -29,7 +29,7 @@ ], "references": [ { - "path": "../tsconfig.publish.json" + "path": "../tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/common/test/tsconfig.esm.publish.json b/jsonrpc/src/common/test/tsconfig.esm.publish.json new file mode 100644 index 000000000..ac72af5d7 --- /dev/null +++ b/jsonrpc/src/common/test/tsconfig.esm.publish.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [ + "mocha" + ], + "composite": true, + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../../lib/esm/common/test", + "tsBuildInfoFile": "../../../lib/esm/common/test/publish.tsbuildInfo", + "incremental": true + }, + "include": [ + "." + ], + "references": [ + { + "path": "../tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/src/common/tsconfig.publish.json b/jsonrpc/src/common/tsconfig.compat.publish.json similarity index 99% rename from jsonrpc/src/common/tsconfig.publish.json rename to jsonrpc/src/common/tsconfig.compat.publish.json index 5610fee51..396773e3e 100644 --- a/jsonrpc/src/common/tsconfig.publish.json +++ b/jsonrpc/src/common/tsconfig.compat.publish.json @@ -29,4 +29,4 @@ "exclude": [ "test" ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/common/tsconfig.esm.publish.json b/jsonrpc/src/common/tsconfig.esm.publish.json new file mode 100644 index 000000000..c4bbc3de6 --- /dev/null +++ b/jsonrpc/src/common/tsconfig.esm.publish.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [], + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../lib/esm/common", + "tsBuildInfoFile": "../../lib/esm/common/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ], + "exclude": [ + "test" + ] +} diff --git a/jsonrpc/src/node/test/tsconfig.publish.json b/jsonrpc/src/node/test/tsconfig.compat.publish.json similarity index 93% rename from jsonrpc/src/node/test/tsconfig.publish.json rename to jsonrpc/src/node/test/tsconfig.compat.publish.json index b3c96817e..13ed43ce5 100644 --- a/jsonrpc/src/node/test/tsconfig.publish.json +++ b/jsonrpc/src/node/test/tsconfig.compat.publish.json @@ -30,7 +30,7 @@ ], "references": [ { - "path": "../tsconfig.publish.json" + "path": "../tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/node/test/tsconfig.esm.publish.json b/jsonrpc/src/node/test/tsconfig.esm.publish.json new file mode 100644 index 000000000..81252fbdb --- /dev/null +++ b/jsonrpc/src/node/test/tsconfig.esm.publish.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [ + "node", + "mocha" + ], + "composite": true, + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../../lib/esm/node/test", + "tsBuildInfoFile": "../../../lib/esm/node/test/publish.tsbuildInfo", + "incremental": true + }, + "include": [ + "." + ], + "references": [ + { + "path": "../tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/src/node/tsconfig.publish.json b/jsonrpc/src/node/tsconfig.compat.publish.json similarity index 93% rename from jsonrpc/src/node/tsconfig.publish.json rename to jsonrpc/src/node/tsconfig.compat.publish.json index c707b341d..921e663c0 100644 --- a/jsonrpc/src/node/tsconfig.publish.json +++ b/jsonrpc/src/node/tsconfig.compat.publish.json @@ -33,7 +33,7 @@ ], "references": [ { - "path": "../common/tsconfig.publish.json" + "path": "../common/tsconfig.compat.publish.json" } ] -} \ No newline at end of file +} diff --git a/jsonrpc/src/node/tsconfig.esm.publish.json b/jsonrpc/src/node/tsconfig.esm.publish.json new file mode 100644 index 000000000..8210ae636 --- /dev/null +++ b/jsonrpc/src/node/tsconfig.esm.publish.json @@ -0,0 +1,39 @@ +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": ".", + "types": [ + "node" + ], + "strict": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "declaration": true, + "stripInternal": true, + "sourceMap": false, + "declarationMap": false, + "noUnusedLocals": true, + "noUnusedParameters": true, + "target": "es2022", + "lib": [ + "es2023" + ], + "outDir": "../../lib/esm/node", + "tsBuildInfoFile": "../../lib/esm/node/publish.tsbuildInfo", + "incremental": true, + "composite": true + }, + "include": [ + "." + ], + "exclude": [ + "test" + ], + "references": [ + { + "path": "../common/tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/tsconfig.compat.publish.json b/jsonrpc/tsconfig.compat.publish.json new file mode 100644 index 000000000..385b0e15d --- /dev/null +++ b/jsonrpc/tsconfig.compat.publish.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "incremental": true, + "composite": true + }, + "files": [], + "references": [ + { + "path": "./src/common/tsconfig.compat.publish.json" + }, + { + "path": "./src/common/test/tsconfig.compat.publish.json" + }, + { + "path": "./src/browser/tsconfig.compat.publish.json" + }, + { + "path": "./src/browser/test/tsconfig.compat.publish.json" + }, + { + "path": "./src/node/tsconfig.compat.publish.json" + }, + { + "path": "./src/node/test/tsconfig.compat.publish.json" + } + ] +} diff --git a/jsonrpc/tsconfig.esm.publish.json b/jsonrpc/tsconfig.esm.publish.json new file mode 100644 index 000000000..475d76d68 --- /dev/null +++ b/jsonrpc/tsconfig.esm.publish.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "incremental": true, + "composite": true + }, + "files": [], + "references": [ + { + "path": "./src/common/tsconfig.esm.publish.json" + }, + { + "path": "./src/common/test/tsconfig.esm.publish.json" + }, + { + "path": "./src/browser/tsconfig.esm.publish.json" + }, + { + "path": "./src/browser/test/tsconfig.esm.publish.json" + }, + { + "path": "./src/node/tsconfig.esm.publish.json" + }, + { + "path": "./src/node/test/tsconfig.esm.publish.json" + } + ] +} diff --git a/jsonrpc/tsconfig.publish.json b/jsonrpc/tsconfig.publish.json index 9cb456c11..212191205 100644 --- a/jsonrpc/tsconfig.publish.json +++ b/jsonrpc/tsconfig.publish.json @@ -6,22 +6,10 @@ "files": [], "references": [ { - "path": "./src/common/tsconfig.publish.json" + "path": "./tsconfig.compat.publish.json" }, { - "path": "./src/common/test/tsconfig.publish.json" - }, - { - "path": "./src/browser/tsconfig.publish.json" - }, - { - "path": "./src/browser/test/tsconfig.publish.json" - }, - { - "path": "./src/node/tsconfig.publish.json" - }, - { - "path": "./src/node/test/tsconfig.publish.json" + "path": "./tsconfig.esm.publish.json" } ] -} \ No newline at end of file +}