Skip to content

Commit 0a56c8e

Browse files
committed
fix(monorepo): Resolve build issues preventing imports
1 parent 88974b2 commit 0a56c8e

257 files changed

Lines changed: 3615 additions & 5413 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# compiled output
77
dist
88
tmp
9-
/out-tsc
9+
out-tsc
1010
out
1111
.nx
1212
**/.powerlines

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// "verboseOutput": true
4848
// }
4949
// },
50-
"./dist/tools/nx/dist/index.js"
50+
"./dist/nx-plugin/index.js"
5151
],
5252
"sync": {
5353
"applyChanges": true,

packages/base/core/src/plugin-base.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,3 @@ export const plugin = <TContext extends BasePluginContext = BasePluginContext>(
118118
}
119119
};
120120
};
121-
122-
export default plugin;

packages/base/core/tsconfig.json

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
11
{
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
4-
"lib": [
5-
"ESNext"
6-
],
7-
"rootDir": "../../..",
8-
"types": [
9-
"node",
10-
"./types/prettier-plugin-organize-imports.d.ts"
11-
],
12-
"strict": true,
13-
"outDir": "../../../dist/out-tsc",
14-
"ignoreDeprecations": "6.0",
15-
"composite": true,
16-
"incremental": true,
17-
"resolveJsonModule": true
4+
"ignoreDeprecations": "6.0"
185
},
19-
"include": [
20-
"src/**/*.ts",
21-
"schemas/**/*.ts",
22-
"types/**/*.d.ts",
23-
"tsdown.config.ts",
24-
"**/*.json",
25-
"package.json"
26-
],
27-
"exclude": [
28-
"vitest.config.mts",
29-
"src/**/*.spec.ts",
30-
"src/**/*.test.ts"
31-
],
326
"references": [
337
{
34-
"path": "../../../tools/config"
8+
"path": "./tsconfig.lib.json"
9+
},
10+
{
11+
"path": "./tsconfig.spec.json"
3512
}
36-
]
13+
],
14+
"files": []
3715
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"tsBuildInfoFile": "out-tsc/tsconfig.tsbuildinfo",
5+
"rootDir": ".",
6+
"types": ["node", "./types/prettier-plugin-organize-imports.d.ts"],
7+
"strict": true,
8+
"outDir": "./out-tsc"
9+
},
10+
"references": [
11+
{
12+
"path": "../../../tools/config"
13+
}
14+
],
15+
"include": [
16+
"src/**/*.ts",
17+
"schemas/**/*.ts",
18+
"types/**/*.d.ts",
19+
"tsdown.config.ts"
20+
],
21+
"exclude": [
22+
"vitest.config.mts",
23+
"src/**/*.spec.ts",
24+
"src/**/*.test.ts",
25+
"out-tsc",
26+
"dist"
27+
]
28+
}

packages/base/engine/tsconfig.json

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,15 @@
11
{
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
4-
"lib": [
5-
"ESNext"
6-
],
7-
"rootDir": "../../../",
8-
"types": [
9-
"node"
10-
],
11-
"strict": true,
12-
"outDir": "../../../dist/out-tsc",
13-
"ignoreDeprecations": "6.0",
14-
"composite": true,
15-
"incremental": true
4+
"ignoreDeprecations": "6.0"
165
},
17-
"include": [
18-
"src/**/*.ts",
19-
"tsdown.config.ts"
20-
],
21-
"exclude": [
22-
"vitest.config.mts",
23-
"src/**/*.spec.ts",
24-
"src/**/*.test.ts"
25-
],
266
"references": [
277
{
28-
"path": "../core"
8+
"path": "./tsconfig.lib.json"
299
},
3010
{
31-
"path": "../../../tools/config"
11+
"path": "./tsconfig.spec.json"
3212
}
33-
]
13+
],
14+
"files": []
3415
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"incremental": true,
5+
"composite": true,
6+
"lib": ["ESNext"],
7+
"rootDir": ".",
8+
"types": ["node"],
9+
"strict": true,
10+
"outDir": "./out-tsc"
11+
},
12+
"references": [
13+
{
14+
"path": "../core/tsconfig.lib.json"
15+
},
16+
{
17+
"path": "../../../tools/config"
18+
}
19+
],
20+
"include": ["src/**/*.ts", "tsdown.config.ts"],
21+
"exclude": ["vitest.config.mts", "src/**/*.spec.ts", "src/**/*.test.ts"]
22+
}

packages/devkit/cli/tsconfig.json

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
11
{
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
4-
"jsx": "preserve",
5-
"jsxImportSource": "@alloy-js/core",
6-
"types": [
7-
"node"
8-
],
9-
"outDir": "../../../dist/out-tsc",
10-
"ignoreDeprecations": "6.0",
11-
"composite": true,
12-
"incremental": true,
13-
"resolveJsonModule": true
4+
"ignoreDeprecations": "6.0"
145
},
15-
"include": [
16-
"src/**/*.ts",
17-
"shell-shock.config.ts",
18-
"shell-shock.d.ts",
19-
"**/*.json",
20-
"package.json"
21-
],
22-
"exclude": [
23-
"vitest.config.mts",
24-
"src/**/*.spec.ts",
25-
"src/**/*.test.ts"
26-
],
276
"references": [
287
{
29-
"path": "../powerlines"
8+
"path": "./tsconfig.lib.json"
9+
},
10+
{
11+
"path": "./tsconfig.spec.json"
3012
}
31-
]
13+
],
14+
"files": []
3215
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"jsx": "preserve",
5+
"jsxImportSource": "@alloy-js/core",
6+
"types": ["node"],
7+
"outDir": "./out-tsc",
8+
"composite": true,
9+
"incremental": true,
10+
"resolveJsonModule": true,
11+
"rootDir": "."
12+
},
13+
"include": ["src/**/*.ts", "shell-shock.config.ts", "shell-shock.d.ts"],
14+
"exclude": [
15+
"vitest.config.mts",
16+
"src/**/*.spec.ts",
17+
"src/**/*.test.ts",
18+
"out-tsc",
19+
"dist"
20+
],
21+
"references": [
22+
{
23+
"path": "../powerlines/tsconfig.lib.json"
24+
}
25+
]
26+
}

packages/devkit/nx/src/base/base-executor.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ export function withExecutor<
154154
const projectConfig =
155155
context.projectsConfigurations.projects[context.projectName]!;
156156

157-
const jiti = createJiti(context.root, {
158-
cache: false
157+
const jiti = createJiti(import.meta.url, {
158+
cache: false,
159+
interopDefault: true
159160
});
160161
// Load via jiti — static require() of powerlines/plugin-utils fails when Nx
161162
// registers ts-node + tsconfig paths (maps to ESM .ts source under type:module).
@@ -168,11 +169,10 @@ export function withExecutor<
168169
) => string;
169170
getName: (cwd: string, root: string) => Promise<string>;
170171
}>("powerlines/plugin-utils"),
171-
jiti
172-
.import<{
173-
default: (params: ExecutionApiParams) => Promise<void>;
174-
}>(jiti.esmResolve(importPath))
175-
.then(mod => mod.default)
172+
jiti.import<(params: ExecutionApiParams) => Promise<void>>(
173+
jiti.esmResolve(importPath),
174+
{ default: true }
175+
)
176176
]);
177177

178178
try {

0 commit comments

Comments
 (0)