Skip to content

Commit 18c2634

Browse files
authored
chore: Use ^workspace: qualifier for peerDependencies against workspace packages (#2372)
1 parent 5f180d2 commit 18c2634

18 files changed

Lines changed: 80 additions & 74 deletions

File tree

apps/treeshake-test/compareResults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import { arrayOf, type } from 'arktype';
3+
import { type } from 'arktype';
44
import * as fs from 'node:fs/promises';
55
import { ResultsTable } from './resultsTable.ts';
66

@@ -11,7 +11,7 @@ const ResultRecord = type({
1111
size: 'number',
1212
});
1313

14-
const BenchmarkResults = arrayOf(ResultRecord);
14+
const BenchmarkResults = ResultRecord.array();
1515

1616
function groupResultsByTest(results: typeof BenchmarkResults.infer) {
1717
const grouped: Record<string, Record<string, number>> = {};

apps/treeshake-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"devDependencies": {
1616
"@types/node": "catalog:types",
17-
"arktype": "1.0.29-alpha",
17+
"arktype": "catalog:",
1818
"esbuild": "^0.25.11",
1919
"ts-loader": "^9.5.4",
2020
"tsdown": "^0.15.6",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"oxfmt": "^0.35.0",
5050
"oxlint": "^1.57.0",
5151
"oxlint-tsgolint": "^0.17.4",
52-
"pkg-pr-new": "^0.0.62",
52+
"pkg-pr-new": "^0.0.66",
5353
"typescript": "catalog:types",
5454
"unplugin-typegpu": "workspace:*",
5555
"vite-imagetools": "catalog:frontend",

packages/tgpu-dev-cli/prepack.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ async function transformPackageJSON() {
9191
distPackageJson.scripts = {};
9292
// Removing dev dependencies.
9393
distPackageJson.devDependencies = undefined;
94-
// Removing workspace specifiers in dependencies.
95-
distPackageJson.dependencies = mapValues(
96-
distPackageJson.dependencies ?? {},
97-
(/** @type {string} */ value) => value.replace(/^workspace:/, ''),
98-
);
99-
distPackageJson.peerDependencies = mapValues(
100-
distPackageJson.peerDependencies ?? {},
101-
(/** @type {string} */ value) => value.replace(/^workspace:/, ''),
102-
);
10394

10495
await fs.writeFile(distPackageJsonUrl, JSON.stringify(distPackageJson, undefined, 2), 'utf-8');
10596
}

packages/tgpu-gen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"vitest": "catalog:test"
2525
},
2626
"peerDependencies": {
27-
"typegpu": "workspace:^0.10.2"
27+
"typegpu": "workspace:^"
2828
},
2929
"engines": {
3030
"node": ">=12.20.0"

packages/tinyest-for-wgsl/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"license": "MIT",
2222
"repository": {
2323
"type": "git",
24-
"url": "git+https://github.com/software-mansion/TypeGPU.git"
24+
"url": "git+https://github.com/software-mansion/TypeGPU.git",
25+
"directory": "packages/tinyest-for-wgsl"
2526
},
2627
"type": "module",
2728
"sideEffects": false,

packages/tinyest/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"license": "MIT",
1414
"repository": {
1515
"type": "git",
16-
"url": "git+https://github.com/software-mansion/TypeGPU.git"
16+
"url": "git+https://github.com/software-mansion/TypeGPU.git",
17+
"directory": "packages/tinyest"
1718
},
1819
"type": "module",
1920
"sideEffects": false,

packages/typegpu-color/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"description": "A set of color helper functions for use in WebGPU/TypeGPU apps.",
55
"keywords": [],
66
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/software-mansion/TypeGPU.git",
10+
"directory": "packages/typegpu-color"
11+
},
712
"type": "module",
813
"sideEffects": false,
914
"exports": {
@@ -40,6 +45,6 @@
4045
"unplugin-typegpu": "workspace:*"
4146
},
4247
"peerDependencies": {
43-
"typegpu": "^0.10.2"
48+
"typegpu": "workspace:^"
4449
}
4550
}

packages/typegpu-geometry/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"description": "A set of geometry helper functions for use in WebGPU/TypeGPU apps.",
66
"keywords": [],
77
"license": "MIT",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/software-mansion/TypeGPU.git",
11+
"directory": "packages/typegpu-geometry"
12+
},
813
"type": "module",
914
"sideEffects": false,
1015
"exports": {
@@ -41,6 +46,6 @@
4146
"unplugin-typegpu": "workspace:*"
4247
},
4348
"peerDependencies": {
44-
"typegpu": "^0.10.2"
49+
"typegpu": "workspace:^"
4550
}
4651
}

packages/typegpu-gl/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"description": "WebGL and GLSL utilities for TypeGPU",
66
"keywords": [],
77
"license": "MIT",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/software-mansion/TypeGPU.git",
11+
"directory": "packages/typegpu-gl"
12+
},
813
"type": "module",
914
"sideEffects": false,
1015
"exports": {
@@ -43,6 +48,6 @@
4348
"unplugin-typegpu": "workspace:*"
4449
},
4550
"peerDependencies": {
46-
"typegpu": "^0.10.2"
51+
"typegpu": "workspace:^"
4752
}
4853
}

0 commit comments

Comments
 (0)