Skip to content

Commit bd611c6

Browse files
committed
Allow ts_project to see package.json (for esmodule resolution).
vercel/next.js#46078
1 parent d675612 commit bd611c6

File tree

25 files changed

+462
-119
lines changed

25 files changed

+462
-119
lines changed

Global.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ declare module '*.png' {
3636
export const blurWidth: number;
3737
export const blurHeight: number;
3838
}
39+
40+
/**
41+
* honestly no idea what causes this issue, but
42+
* im not fucking around w it
43+
*/
44+
declare module 'react/jsx-runtime' {
45+
const content: string;
46+
export default content;
47+
}

MODULE.bazel.lock

Lines changed: 29 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,10 @@ js_binary(
4545
"//project/ck3/recursive-vassals:patch",
4646
"//ts/cmd/svgshot:npm_pkg.publish",
4747
"//ts/cmd/svgshot:npm_pkg.tgz",
48-
"//ts/cmd/svgshot:package.json",
4948
"//ts/do-sync:npm_pkg.publish",
5049
"//ts/do-sync:npm_pkg.tgz",
51-
"//ts/do-sync:package.json",
5250
"//ts/knowitwhenyouseeit:npm_pkg.publish",
5351
"//ts/knowitwhenyouseeit:npm_pkg.tgz",
54-
"//ts/knowitwhenyouseeit:package.json",
5552
],
5653
entry_point = "postsubmit.js",
5754
)

js/npm/package_json/rules.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def package_json(name, targets, template, version, depSpec):
2424
],
2525
args = [
2626
"--out",
27-
"../../../$(execpath package.json)",
27+
"../../../$(execpath package_new.json)",
2828
"--base",
2929
"../../../$(location //:package_json)",
3030
"--query",
@@ -38,5 +38,5 @@ def package_json(name, targets, template, version, depSpec):
3838
"--depOnlyOut",
3939
"../../../$(execpath " + depSpec + ")",
4040
],
41-
outs = ["package.json", depSpec],
41+
outs = ["package_new.json", depSpec],
4242
)

mdx/rules.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("//ts/mdx/cmd/mdx-transform:rules.bzl", "mdx_to_ts")
2+
13
def mdx_lint(name, srcs = None):
24
pass
35
#eslint_test(
@@ -15,3 +17,8 @@ def mdx_files(name, srcs = None):
1517
name = name,
1618
srcs = srcs,
1719
)
20+
21+
mdx_to_ts(
22+
name = name + "_ts",
23+
srcs = srcs,
24+
)

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
},
104104
"dependencies": {
105105
"@commander-js/extra-typings": "12.0.0",
106+
"@mdx-js/mdx": "^3.0.0",
106107
"@next/eslint-plugin-next": "14.1.0",
107108
"@pulumi/command": "4.5.0",
108109
"@pulumi/random": "4.15.1",
@@ -129,10 +130,15 @@
129130
"npm": "10.4.0",
130131
"pako": "2.1.0",
131132
"pnpm": "^8.0.0",
133+
"remark": "^15.0.1",
132134
"seedrandom": "3.0.5",
133135
"selenium-webdriver": "4.18.0",
134136
"serve-handler": "6.1.5",
135-
"zod": "3.22.4"
137+
"zod": "3.22.4",
138+
"source-map": "^0.7.4",
139+
"to-vfile": "^8.0.0",
140+
"unified": "^11.0.4",
141+
"vfile": "^6.0.1"
136142
},
137143
"pnpm": {
138144
"overrides": {

0 commit comments

Comments
 (0)