Skip to content

Commit 20ce7b2

Browse files
committed
esm
1 parent 38f8bfb commit 20ce7b2

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

.yarn/patches/nullthrows-npm-1.1.1-3d1f817134.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ index d4953f2f47b79701e5f125b9c041fb185668dd53..5c48891acb35ca7ac8a3393e54cd89a1
1010
+ value?: T | null,
1111
+ message?: string,
1212
+): NonNullable<T>;
13-
13+
1414
-export default function nullthrows<T>(value?: T | null, message?: string): T;
1515
+// Patched based on https://github.com/microsoft/TypeScript/issues/46770#issuecomment-1039459991 and https://github.com/zertosh/nullthrows/pull/15
1616
+

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"workspaces/repository-scripts",
1919
"workspaces/util"
2020
],
21+
"type": "module",
2122
"scripts": {
2223
"format": "yarn workspace @code-chronicles/repository-scripts start format",
2324
"lint": "yarn workspace @code-chronicles/repository-scripts start lint",

workspaces/adventure-pack/goodies/typescript/Iterator.prototype.drop/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "../Iterator.prototype.toIterable";
1+
import "../Iterator.prototype.toIterable/index.ts";
22
import { iteratorPrototype } from "../Iterator.prototype/index.ts";
33

44
declare global {

workspaces/adventure-pack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
"goodies:python3:test": "bash goodies/python3/test.sh",
4848
"goodies:typescript:format": "prettier --color --write goodies/typescript",
4949
"goodies:typescript:install": "yarn",
50-
"goodies:typescript:test": "jest --color \"/goodies/typescript/\"",
50+
"goodies:typescript:test": "jest --color --testPathIgnorePatterns=\"<rootDir>/goodies/\"",
5151
"build-app": "tsx src/scripts/build/main.ts",
5252
"build-chrome-extension": "tsx src/scripts/build/buildChromeExtension.ts",
53-
"package-goodies:test": "jest --color --testPathIgnorePatterns=\"<rootDir>/goodies/\"",
53+
"package-goodies:test": "jest --color \"/goodies/typescript/\"",
5454
"format": "yarn goodies:java:format && yarn goodies:kotlin:format && yarn goodies:python3:format && yarn goodies:typescript:format && prettier --color --write .",
5555
"lint": "eslint --color --max-warnings=0 .",
5656
"postinstall": "yarn goodies:java:install && yarn goodies:kotlin:install && yarn goodies:python3:install",

workspaces/adventure-pack/src/app/components/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { useAppState } from "../useAppState.ts";
99
import type { Goody } from "../Goody.ts";
1010
import { LanguageSelector } from "./LanguageSelector.tsx";
1111

12+
// TODO: add a lint rule that files are imported with their actual extension (i.e. ".tsx" not ".ts" where applicable)
13+
1214
function Column({
1315
children,
1416
flex,

workspaces/adventure-pack/src/app/stringifyTypeScriptModuleDeclarations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { isStringEmptyOrWhitespaceOnly } from "@code-chronicles/util/isStringEmp
55
import type { GoodyModuleDeclaration } from "../scripts/package-goodies/typescript/extractModuleDeclarations.ts";
66
import { stringifyTypeScriptInterfaceDeclarations } from "./stringifyTypeScriptInterfaceDeclarations.ts";
77

8+
// TODO: we should probably not allow impoting stuff from the scripts, even if it's just the type
9+
810
const INDENT = " ";
911

1012
export function stringifyTypeScriptModuleDeclarations(

workspaces/adventure-pack/src/app/useAppState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import immutableUpdate from "immutability-helper";
2-
import { useReducer, type Dispatch as ReactDispatch } from "react";
2+
import { type Dispatch as ReactDispatch, useReducer } from "react";
33

44
import type { GoodiesByLanguage } from "./fetchGoodies.ts";
55
import type { Language } from "./Language.ts";

workspaces/adventure-pack/webpack.config.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ const config: Configuration = {
3434
],
3535
},
3636

37-
resolve: {
38-
extensions: [".tsx", ".ts", "..."],
39-
},
40-
4137
plugins: [
4238
new webpack.DefinePlugin({
4339
ADVENTURE_PACK_COMMIT_HASH: JSON.stringify(commitHash),

0 commit comments

Comments
 (0)