Skip to content

Commit

Permalink
Allow ts_project to see package.json (for esmodule resolution).
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemnmez committed Mar 1, 2024
1 parent d675612 commit 8c2cac8
Show file tree
Hide file tree
Showing 23 changed files with 460 additions and 106 deletions.
9 changes: 9 additions & 0 deletions Global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,12 @@ declare module '*.png' {
export const blurWidth: number;
export const blurHeight: number;
}

/**
* honestly no idea what causes this issue, but
* im not fucking around w it
*/
declare module 'react/jsx-runtime' {
const content: string;
export default content;
}
36 changes: 29 additions & 7 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions ci/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,10 @@ js_binary(
"//project/ck3/recursive-vassals:patch",
"//ts/cmd/svgshot:npm_pkg.publish",
"//ts/cmd/svgshot:npm_pkg.tgz",
"//ts/cmd/svgshot:package.json",
"//ts/do-sync:npm_pkg.publish",
"//ts/do-sync:npm_pkg.tgz",
"//ts/do-sync:package.json",
"//ts/knowitwhenyouseeit:npm_pkg.publish",
"//ts/knowitwhenyouseeit:npm_pkg.tgz",
"//ts/knowitwhenyouseeit:package.json",
],
entry_point = "postsubmit.js",
)
Expand Down
4 changes: 2 additions & 2 deletions js/npm/package_json/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def package_json(name, targets, template, version, depSpec):
],
args = [
"--out",
"../../../$(execpath package.json)",
"../../../$(execpath package_new.json)",
"--base",
"../../../$(location //:package_json)",
"--query",
Expand All @@ -38,5 +38,5 @@ def package_json(name, targets, template, version, depSpec):
"--depOnlyOut",
"../../../$(execpath " + depSpec + ")",
],
outs = ["package.json", depSpec],
outs = ["package_new.json", depSpec],
)
7 changes: 7 additions & 0 deletions mdx/rules.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("//ts/mdx/cmd/mdx-transform:rules.bzl", "mdx_to_ts")

def mdx_lint(name, srcs = None):
pass
#eslint_test(
Expand All @@ -15,3 +17,8 @@ def mdx_files(name, srcs = None):
name = name,
srcs = srcs,
)

mdx_to_ts(
name = name + "_ts",
srcs = srcs,
)
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
},
"dependencies": {
"@commander-js/extra-typings": "12.0.0",
"@mdx-js/mdx": "^3.0.0",
"@next/eslint-plugin-next": "14.1.0",
"@pulumi/command": "4.5.0",
"@pulumi/random": "4.15.1",
Expand All @@ -129,10 +130,15 @@
"npm": "10.4.0",
"pako": "2.1.0",
"pnpm": "^8.0.0",
"remark": "^15.0.1",
"seedrandom": "3.0.5",
"selenium-webdriver": "4.18.0",
"serve-handler": "6.1.5",
"zod": "3.22.4"
"zod": "3.22.4",
"source-map": "^0.7.4",
"to-vfile": "^8.0.0",
"unified": "^11.0.4",
"vfile": "^6.0.1"
},
"pnpm": {
"overrides": {
Expand Down
Loading

0 comments on commit 8c2cac8

Please sign in to comment.