diff --git a/package.json b/package.json index 7fcc40a2b..4431df775 100644 --- a/package.json +++ b/package.json @@ -11,18 +11,6 @@ ], "main": "js/flatbuffers.js", "module": "mjs/flatbuffers.js", - "exports": { - ".": { - "node": { - "import": "./mjs/flatbuffers.js", - "require": "./js/flatbuffers.js" - }, - "default": "./js/flatbuffers.js" - }, - "./js/flexbuffers.js": { - "default": "./js/flexbuffers.js" - } - }, "directories": { "doc": "docs", "test": "tests" diff --git a/tests/ts/TypeScriptTest.py b/tests/ts/TypeScriptTest.py index de607983e..ae357ef09 100755 --- a/tests/ts/TypeScriptTest.py +++ b/tests/ts/TypeScriptTest.py @@ -126,7 +126,9 @@ NODE_CMD = ["node"] print("Running TypeScript Tests...") check_call(NODE_CMD + ["JavaScriptTest"]) -check_call(NODE_CMD + ["JavaScriptTestv1.cjs", "./monster_test_generated.cjs"]) check_call(NODE_CMD + ["JavaScriptUnionVectorTest"]) check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"]) check_call(NODE_CMD + ["JavaScriptComplexArraysTest"]) + +print("Running old v1 TypeScript Tests...") +check_call(NODE_CMD + ["JavaScriptTestv1.cjs", "./monster_test_generated.cjs"]) diff --git a/tsconfig.json b/tsconfig.json index 1636255e7..a8c89f5ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "ES2020", - "module": "CommonJS", + "target": "es2020", + "module": "commonjs", "lib": ["ES2020", "DOM"], "declaration": true, "outDir": "./js", diff --git a/tsconfig.mjs.json b/tsconfig.mjs.json index 4c58d8492..20adaa38b 100644 --- a/tsconfig.mjs.json +++ b/tsconfig.mjs.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "ES2020", - "module": "NodeNext", + "target": "es2020", + "module": "es2020", "lib": ["ES2020", "DOM"], "declaration": true, "outDir": "./mjs", diff --git a/yarn.lock b/yarn.lock index 0150fa981..8b806a544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1169,4 +1169,4 @@ yallist@^4.0.0: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file