Skip to content

Commit 8c03011

Browse files
committed
chore: replace yalc with pkglab for local package development
Removes yalc entirely and replaces it with pkglab, which publishes to a real local Verdaccio registry for proper npm-like installs. Each package now has a dev:pub script that runs the build in watch mode and fires pkglab pub --ping on each rebuild, letting the listener coalesce rapid publishes into batched cycles. Playground apps use workspace:* instead of file:.yalc references.
1 parent 2627442 commit 8c03011

58 files changed

Lines changed: 3326 additions & 3379 deletions

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: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ lerna-debug.log
6161
.next
6262
.dev.vars
6363
.env.local
64-
.yalc
65-
yalc.lock
6664
playground/*/build
6765
playground/*/public/build
6866
playground/*/.cache

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
.tsup
77
.turbo
88
.vscode
9-
.yalc
109
/**/scripts/info.js
1110
*.map
1211
*.min.js

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"search.exclude": {
33
"**/.tsup": true,
44
"**/.turbo": true,
5-
"**/.yalc": true,
65
"**/node_modules": true,
76
".temp_integration": true,
87
"packages/*/dist": true,

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The current monorepo setup is based on:
3636
- [Turborepo](https://turbo.build/repo/docs), used for task running and task output caching.
3737
- [Changesets](https://github.com/changesets/changesets), used for package versioning, publishing and changelog generation.
3838
- [GitHub Actions](https://docs.github.com/en/actions), used for quality checks and automated release orchestration.
39-
- [Yalc](https://github.com/wclr/yalc), used for to publish packages locally and test them in other local projects.
39+
- [pkglab](https://github.com/pkglab/pkglab), used for publishing packages locally and testing them in other local projects.
4040
- [Jest](https://jestjs.io/) or [Vitest](https://vitest.dev/), used for running unit tests.
4141
- [Playwright](https://playwright.dev/), used for running the [integration](../integration/) test suite.
4242

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ export default tseslint.config([
257257
'.next',
258258
'.turbo',
259259
'.vscode',
260-
'.yalc',
261260
'!.*.js',
262261
'**/.turbo/*',
263262
'**/build/*',

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"local:registry:up": "./scripts/local-registry.sh up",
3030
"nuke": "node ./scripts/nuke.mjs",
3131
"prepare": "husky install",
32+
"pub": "pkglab pub",
3233
"release": "changeset publish && git push --follow-tags",
3334
"release:canary": "changeset publish --tag canary --no-git-tag",
3435
"release:canary-core3": "changeset publish --tag canary-core3 --no-git-tag",
@@ -67,8 +68,7 @@
6768
"version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false",
6869
"version-packages:canary": "./scripts/canary.mjs",
6970
"version-packages:canary-core3": "./scripts/canary-core3.mjs",
70-
"version-packages:snapshot": "./scripts/snapshot.mjs",
71-
"yalc:all": "for d in packages/*/; do echo $d; cd $d; pnpm yalc push --replace --sig; cd '../../'; done"
71+
"version-packages:snapshot": "./scripts/snapshot.mjs"
7272
},
7373
"devDependencies": {
7474
"@actions/core": "^1.11.1",
@@ -133,6 +133,7 @@
133133
"json5": "2.2.3",
134134
"jsonwebtoken": "9.0.2",
135135
"lint-staged": "^14.0.1",
136+
"pkglab": "^0.10.0",
136137
"prettier": "^3.6.2",
137138
"prettier-plugin-astro": "^0.14.1",
138139
"prettier-plugin-packagejson": "^2.5.15",
@@ -157,7 +158,6 @@
157158
"uuid": "8.3.2",
158159
"verdaccio": "6.1.6",
159160
"vitest": "3.2.4",
160-
"yalc": "1.0.0-pre.53",
161161
"zx": "catalog:repo"
162162
},
163163
"packageManager": "pnpm@10.17.1+sha512.17c560fca4867ae9473a3899ad84a88334914f379be46d455cbf92e5cf4b39d34985d452d2583baf19967fa76cb5c17bc9e245529d0b98745721aa7200ecaf7a",

packages/agent-toolkit/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"build": "tsup --env.NODE_ENV production",
4040
"clean": "rimraf ./dist",
4141
"dev": "tsup --watch",
42+
"dev:pub": "pnpm dev -- --env.publish",
4243
"format": "node ../../scripts/format-package.mjs",
4344
"format:check": "node ../../scripts/format-package.mjs --check",
4445
"lint": "eslint src",

packages/agent-toolkit/tsup.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { name, version } from './package.json';
44

55
export default defineConfig(overrideOptions => {
66
const isProd = overrideOptions.env?.NODE_ENV === 'production';
7+
const shouldPublish = !!overrideOptions.env?.publish;
78

89
return {
910
entry: [
@@ -17,6 +18,7 @@ export default defineConfig(overrideOptions => {
1718
bundle: true,
1819
sourcemap: true,
1920
format: 'esm',
21+
onSuccess: shouldPublish ? 'pkglab pub --ping' : undefined,
2022
define: {
2123
PACKAGE_NAME: `"${name}"`,
2224
PACKAGE_VERSION: `"${version}"`,

packages/astro/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
"build": "tsup --onSuccess \"pnpm build:dts\" && pnpm copy:components",
8181
"build:dts": "tsc --emitDeclarationOnly --declaration",
8282
"copy:components": "rm -rf ./components && mkdir -p ./components/ && cp -r ./src/astro-components/* ./components/ && cp ./src/types.ts ./",
83-
"dev": "tsup --watch --onSuccess \"pnpm build:dts\"",
83+
"dev": "tsup --watch",
84+
"dev:pub": "pnpm dev -- --env.publish",
8485
"format": "node ../../scripts/format-package.mjs",
8586
"format:check": "node ../../scripts/format-package.mjs --check",
8687
"lint": "eslint src env.d.ts",
8788
"lint:attw": "attw --pack . --profile esm-only --ignore-rules internal-resolution-error",
8889
"lint:publint": "pnpm copy:components && publint",
89-
"publish:local": "pnpm yalc push --replace --sig",
9090
"test": "vitest run"
9191
},
9292
"dependencies": {

packages/astro/tsup.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { defineConfig } from 'tsup';
33
// @ts-ignore
44
import { name, version } from './package.json';
55

6-
export default defineConfig(() => {
6+
export default defineConfig(overrideOptions => {
7+
const shouldPublish = !!overrideOptions.env?.publish;
8+
79
return {
810
clean: true,
911
entry: [
@@ -19,6 +21,7 @@ export default defineConfig(() => {
1921
],
2022
dts: true,
2123
minify: false,
24+
onSuccess: shouldPublish ? 'pnpm build:dts && pkglab pub --ping' : 'pnpm build:dts',
2225
define: {
2326
PACKAGE_NAME: `"${name}"`,
2427
PACKAGE_VERSION: `"${version}"`,

0 commit comments

Comments
 (0)