Skip to content

Commit 049865d

Browse files
bjornharrtellJochen Parmentier
authored and
Jochen Parmentier
committed
Simplify and fix TypeScript compilation output (google#7815)
* Simplify and fix TypeScript compilation output * Revert deps upgrade
1 parent 82de163 commit 049865d

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@
1111
],
1212
"main": "js/flatbuffers.js",
1313
"module": "mjs/flatbuffers.js",
14-
"exports": {
15-
".": {
16-
"node": {
17-
"import": "./mjs/flatbuffers.js",
18-
"require": "./js/flatbuffers.js"
19-
},
20-
"default": "./js/flatbuffers.js"
21-
},
22-
"./js/flexbuffers.js": {
23-
"default": "./js/flexbuffers.js"
24-
}
25-
},
2614
"directories": {
2715
"doc": "docs",
2816
"test": "tests"

tests/ts/TypeScriptTest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ def esbuild(input, output):
126126

127127
print("Running TypeScript Tests...")
128128
check_call(NODE_CMD + ["JavaScriptTest"])
129-
check_call(NODE_CMD + ["JavaScriptTestv1.cjs", "./monster_test_generated.cjs"])
130129
check_call(NODE_CMD + ["JavaScriptUnionVectorTest"])
131130
check_call(NODE_CMD + ["JavaScriptFlexBuffersTest"])
132131
check_call(NODE_CMD + ["JavaScriptComplexArraysTest"])
132+
133+
print("Running old v1 TypeScript Tests...")
134+
check_call(NODE_CMD + ["JavaScriptTestv1.cjs", "./monster_test_generated.cjs"])

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
4-
"module": "CommonJS",
3+
"target": "es2020",
4+
"module": "commonjs",
55
"lib": ["ES2020", "DOM"],
66
"declaration": true,
77
"outDir": "./js",

tsconfig.mjs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2020",
4-
"module": "NodeNext",
3+
"target": "es2020",
4+
"module": "es2020",
55
"lib": ["ES2020", "DOM"],
66
"declaration": true,
77
"outDir": "./mjs",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,4 +1169,4 @@ yallist@^4.0.0:
11691169
yocto-queue@^0.1.0:
11701170
version "0.1.0"
11711171
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
1172-
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
1172+
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

0 commit comments

Comments
 (0)