@smoothbricks/nx-plugin 0.3.14 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -13
- package/dist/bin/smoo-nx-exec.d.ts +3 -0
- package/dist/bin/smoo-nx-exec.d.ts.map +1 -0
- package/dist/bin/{ensure-built.js → smoo-nx-exec.js} +17 -5
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +5 -2
- package/dist/cargo-workspace.d.ts +15 -1
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +113 -8
- package/dist/ensure-built.d.ts +3 -0
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +21 -1
- package/dist/executors/typescript-emit/executor.d.ts.map +1 -1
- package/dist/executors/typescript-emit/executor.js +20 -2
- package/dist/executors/typescript-emit/schema.d.ts +1 -0
- package/dist/executors/typescript-emit/schema.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +345 -88
- package/dist/package-target-policy.d.ts.map +1 -1
- package/dist/package-target-policy.js +2 -1
- package/package.json +4 -4
- package/src/bin/{ensure-built.ts → smoo-nx-exec.ts} +18 -6
- package/src/bounded-test-policy.test.ts +21 -0
- package/src/bounded-test-policy.ts +6 -2
- package/src/cargo-workspace.test.ts +142 -0
- package/src/cargo-workspace.ts +137 -8
- package/src/ensure-built.test.ts +121 -21
- package/src/ensure-built.ts +23 -1
- package/src/executors/typescript-emit/executor.test.ts +37 -1
- package/src/executors/typescript-emit/executor.ts +24 -2
- package/src/executors/typescript-emit/schema.json +8 -0
- package/src/executors/typescript-emit/schema.ts +1 -0
- package/src/index.test.ts +177 -10
- package/src/index.ts +436 -90
- package/src/package-target-policy.test.ts +13 -0
- package/src/package-target-policy.ts +2 -1
- package/dist/bin/ensure-built.d.ts +0 -3
- package/dist/bin/ensure-built.d.ts.map +0 -1
|
@@ -546,6 +546,19 @@ describe('per-package checkPackageTargets', () => {
|
|
|
546
546
|
const issues = checkPackageTargets(pkg, 'packages/lib');
|
|
547
547
|
expect(issues.some((i) => i.message.includes('build:ts') && i.message.includes('colon'))).toBe(true);
|
|
548
548
|
});
|
|
549
|
+
|
|
550
|
+
it('accepts the Nx inferred-target merge marker', () => {
|
|
551
|
+
const pkg = {
|
|
552
|
+
nx: {
|
|
553
|
+
name: 'lib',
|
|
554
|
+
targets: {
|
|
555
|
+
build: { dependsOn: ['...', 'rust-dist'] },
|
|
556
|
+
},
|
|
557
|
+
},
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
expect(checkPackageTargets(pkg, 'packages/lib', new Set(['build', 'rust-dist']))).toEqual([]);
|
|
561
|
+
});
|
|
549
562
|
});
|
|
550
563
|
|
|
551
564
|
describe('per-package applyPackageTargets', () => {
|
|
@@ -728,7 +728,8 @@ function validateTargetDependencies(
|
|
|
728
728
|
if (typeof dependency !== 'string') {
|
|
729
729
|
continue;
|
|
730
730
|
}
|
|
731
|
-
|
|
731
|
+
// Nx expands "..." to the inferred target's existing dependencies before merging explicit entries.
|
|
732
|
+
if (dependency === '...' || isCrossProjectTargetDependency(dependency, projectNames)) {
|
|
732
733
|
continue;
|
|
733
734
|
}
|
|
734
735
|
if (dependency.includes(':')) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-built.d.ts","sourceRoot":"","sources":["../../src/bin/ensure-built.ts"],"names":[],"mappings":""}
|