From e377c7f77947dc29c990fd34c6c6d19a31a1e567 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 19 Aug 2026 15:35:44 -0400 Subject: [PATCH] Fix ci --- ember-primitives/package.json | 1 + turbo.json | 31 +++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ember-primitives/package.json b/ember-primitives/package.json index c0427291..215ac93c 100644 --- a/ember-primitives/package.json +++ b/ember-primitives/package.json @@ -18,6 +18,7 @@ "bin": "./bin/index.mjs", "scripts": { "build": "rollup --config ./rollup.config.mjs", + "sync": "echo 'pnpm is syncing this package into the workspaces that inject it. (this is configured in .npmrc)'", "lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'", "lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:' && pnpm format", "lint:js": "eslint . --cache", diff --git a/turbo.json b/turbo.json index 693b5589..2b2c23b8 100644 --- a/turbo.json +++ b/turbo.json @@ -47,12 +47,12 @@ ///////////////////////////////////////////////// ///////////////////////////////////////////////// "dev": { - "dependsOn": ["^build"], + "dependsOn": ["^build", "^sync"], "cache": false, "persistent": true }, "start": { - "dependsOn": ["^build"], + "dependsOn": ["^build", "^sync"], "outputs": [], "cache": false, "persistent": true @@ -68,7 +68,7 @@ // development "build:dev": { "outputs": ["dist/**", "dist-types/**", "declarations/**"], - "dependsOn": ["^build"] + "dependsOn": ["^build", "^sync"] }, "pack": { "outputs": ["*.tgz"], @@ -77,23 +77,34 @@ // production "build": { "outputs": ["dist/**", "dist-types/**", "declarations/**", "docs.json"], - "dependsOn": ["^build", "//#sync"] + "dependsOn": ["^build", "^sync"] + }, + // Injected workspace deps (see dependenciesMeta) are hardlinked copies, + // so a dependent's node_modules does not see its dependency's `dist/` + // until pnpm re-syncs. `.npmrc`'s sync-injected-deps-after-scripts makes + // pnpm do that after the `build` *and* `sync` scripts -- but on a turbo + // cache hit the `build` script never runs, so nothing syncs and the + // dependent resolves a package with no `dist/`. Hence this task: it is + // uncached, so it always runs, and it depends on the (possibly restored) + // `build`, so it always has something to copy. + "sync": { + "dependsOn": ["build"], + "cache": false }, - "//#sync": {}, "test": { "outputs": [], - "dependsOn": ["^build"] + "dependsOn": ["^build", "^sync"] }, // Apps will have test:ember and test:browserstack // They are separate so that they can cache independently // and provide more variability than just "test" "test:ember": { "env": ["CI_BROWSER", "EMBER_TRY_CURRENT_SCENARIO", "EMBROIDER_TEST_SETUP_OPTIONS"], - "dependsOn": ["^build"] + "dependsOn": ["^build", "^sync"] }, // All scenarios "test:scenarios": { - "dependsOn": ["^build"] + "dependsOn": ["^build", "^sync"] }, ///////////////////////////////////////////////// @@ -114,10 +125,10 @@ "lint:published-types" ] }, - "lint:js": { "outputs": [], "dependsOn": ["^build"] }, + "lint:js": { "outputs": [], "dependsOn": ["^build", "^sync"] }, "lint:hbs": { "outputs": [] }, "lint:prettier": { "outputs": [] }, - "lint:types": { "outputs": [], "dependsOn": ["^build"] }, + "lint:types": { "outputs": [], "dependsOn": ["^build", "^sync"] }, "lint:package": { "outputs": [], "dependsOn": ["build"] }, "lint:published-types": { "outputs": [], "dependsOn": ["pack"] },