diff --git a/.circleci/config.yml b/.circleci/config.yml index 7270edfa346e..271900a2c62e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -325,9 +325,9 @@ jobs: - run: command: | corepack enable - cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd $(STORYBOOK_SANDBOX_ROOT=./sandbox yarn get-sandbox-dir --template $TEMPLATE) && yarn + cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn + cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination name: Install sandbox dependencies - run: command: STORYBOOK_SANDBOX_ROOT=./sandbox yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit @@ -775,7 +775,7 @@ jobs: steps: - checkout - attach_workspace: - at: /tmp + at: C:\Users\circleci - run: command: | choco install nodejs-lts --version=22.11.0 -y @@ -924,6 +924,7 @@ jobs: STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >> name: Storybook init from empty directory (Windows --skip-install) shell: bash.exe + working_directory: C:\Users\circleci\storybook test-init-features: executor: class: small diff --git a/.circleci/src/jobs/chromatic-sandboxes.yml b/.circleci/src/jobs/chromatic-sandboxes.yml index a21408938aa7..ef0bd31c8567 100644 --- a/.circleci/src/jobs/chromatic-sandboxes.yml +++ b/.circleci/src/jobs/chromatic-sandboxes.yml @@ -17,9 +17,9 @@ steps: # chromatic can only run in a git directory command: | corepack enable - cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) - cd $(STORYBOOK_SANDBOX_ROOT=./sandbox yarn get-sandbox-dir --template $TEMPLATE) && yarn + cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn + cp /tmp/storybook-sandboxes /tmp/storybook/sandbox -r --remove-destination - run: name: Running Chromatic command: STORYBOOK_SANDBOX_ROOT=./sandbox yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit diff --git a/.circleci/src/jobs/test-init-empty-windows.yml b/.circleci/src/jobs/test-init-empty-windows.yml index 671ba21c41cb..29896855b782 100644 --- a/.circleci/src/jobs/test-init-empty-windows.yml +++ b/.circleci/src/jobs/test-init-empty-windows.yml @@ -6,10 +6,12 @@ parameters: template: type: string +working_directory: 'C:\Users\circleci\storybook' + steps: - checkout - attach_workspace: - at: /tmp + at: 'C:\Users\circleci' - run: name: Setup Node & Yarn on Windows shell: bash.exe diff --git a/code/lib/cli-storybook/src/sandbox-templates.ts b/code/lib/cli-storybook/src/sandbox-templates.ts index 6eea4a15ed4c..82b5d94d6939 100644 --- a/code/lib/cli-storybook/src/sandbox-templates.ts +++ b/code/lib/cli-storybook/src/sandbox-templates.ts @@ -629,9 +629,7 @@ export const baseTemplates = { script: 'npx -p @angular/cli@next ng new angular-v16 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn --ssr', modifications: { - // Angular 21 has introduced a peer dependency requirement on standard-schema via @angular/forms` - // TODO: use @angular/forms@next as soon as @angular/cli@next points to the same version - extraDependencies: ['@standard-schema/spec@^1', '@angular/forms@^21.0.0'], + extraDependencies: ['@standard-schema/spec@^1', '@angular/forms@next'], }, expected: { framework: '@storybook/angular', diff --git a/scripts/sandbox/generate.ts b/scripts/sandbox/generate.ts index f5a6cb18b785..81d906001238 100755 --- a/scripts/sandbox/generate.ts +++ b/scripts/sandbox/generate.ts @@ -64,13 +64,13 @@ const withLocalRegistry = async ({ action, cwd, env, debug }: LocalRegistryProps console.log(`📦 Configuring local registry: ${LOCAL_REGISTRY_URL}`); // NOTE: for some reason yarn prefers the npm registry in // local development, so always use npm - await runCommand(`npm config set registry ${LOCAL_REGISTRY_URL}`, { cwd, env }, debug); + await runCommand(`npm config set registry ${LOCAL_REGISTRY_URL} -g`, { cwd, env }, debug); await action(); } catch (e) { error = e; } finally { console.log(`📦 Restoring registry: ${prevUrl}`); - await runCommand(`npm config set registry ${prevUrl}`, { cwd, env }, debug); + await runCommand(`npm config set registry ${prevUrl} -g`, { cwd, env }, debug); if (error) { throw error;