Skip to content

Commit

Permalink
Simplify and fix TypeScript compilation output (google#7815)
Browse files Browse the repository at this point in the history
* Simplify and fix TypeScript compilation output

* Revert deps upgrade
  • Loading branch information
bjornharrtell authored and Jochen Parmentier committed Oct 29, 2024
1 parent 8ba1683 commit 4be3930
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
12 changes: 0 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion tests/ts/TypeScriptTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def esbuild(input, output):

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"])
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"target": "es2020",
"module": "commonjs",
"lib": ["ES2020", "DOM"],
"declaration": true,
"outDir": "./js",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.mjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "NodeNext",
"target": "es2020",
"module": "es2020",
"lib": ["ES2020", "DOM"],
"declaration": true,
"outDir": "./mjs",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==

0 comments on commit 4be3930

Please sign in to comment.