Only support Angular >= 14

This commit is contained in:
Valentin Palkovic 2023-01-10 14:17:21 +01:00
parent db876bf7ad
commit e204a21f65
9 changed files with 958 additions and 2303 deletions

View File

@ -599,23 +599,23 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 16
parallelism: 15
requires:
- build
- build-sandboxes:
parallelism: 16
parallelism: 15
requires:
- create-sandboxes
- test-runner-sandboxes:
parallelism: 16
parallelism: 15
requires:
- build-sandboxes
- chromatic-sandboxes:
parallelism: 16
parallelism: 15
requires:
- build-sandboxes
- e2e-sandboxes:
parallelism: 16
parallelism: 15
requires:
- build-sandboxes
daily:
@ -624,25 +624,25 @@ workflows:
jobs:
- build
- create-sandboxes:
parallelism: 28
parallelism: 27
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 28
parallelism: 27
requires:
- create-sandboxes
- test-runner-sandboxes:
parallelism: 28
parallelism: 27
requires:
- build-sandboxes
- chromatic-sandboxes:
parallelism: 28
parallelism: 27
requires:
- build-sandboxes
- e2e-sandboxes:
parallelism: 28
parallelism: 27
requires:
- build-sandboxes

View File

@ -37,6 +37,7 @@
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.29",
"@storybook/cli": "7.0.0-beta.29",
"@storybook/client-logger": "7.0.0-beta.29",
"@storybook/core-client": "7.0.0-beta.29",
"@storybook/core-common": "7.0.0-beta.29",
@ -65,18 +66,17 @@
"webpack": "5"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1303.5",
"@angular-devkit/build-angular": "^13.3.5",
"@angular-devkit/core": "^13.3.5",
"@angular/cli": "^13.3.5",
"@angular/common": "^13.3.6",
"@angular/compiler": "^13.3.6",
"@angular/compiler-cli": "^13.3.6",
"@angular/core": "^13.3.6",
"@angular/forms": "^13.3.6",
"@angular/platform-browser": "^13.3.6",
"@angular/platform-browser-dynamic": "^13.3.6",
"@nrwl/workspace": "14.6.1",
"@angular-devkit/architect": "^0.1500.4",
"@angular-devkit/build-angular": "^15.0.4",
"@angular-devkit/core": "^15.0.4",
"@angular/cli": "^15.0.4",
"@angular/common": "^15.0.4",
"@angular/compiler": "^15.0.4",
"@angular/compiler-cli": "^15.0.4",
"@angular/core": "^15.0.4",
"@angular/forms": "^15.0.4",
"@angular/platform-browser": "^15.0.4",
"@angular/platform-browser-dynamic": "^15.0.4",
"@types/rimraf": "^3.0.2",
"@types/tmp": "^0.2.3",
"cross-spawn": "^7.0.3",
@ -90,17 +90,17 @@
"zone.js": "^0.12.0"
},
"peerDependencies": {
"@angular-devkit/architect": ">=0.1300.0",
"@angular-devkit/build-angular": ">=13.0.0",
"@angular-devkit/core": ">=13.0.0",
"@angular/cli": ">=13.0.0",
"@angular/common": ">=13.0.0",
"@angular/compiler": ">=13.0.0",
"@angular/compiler-cli": ">=13.0.0",
"@angular/core": ">=13.0.0",
"@angular/forms": ">=13.0.0",
"@angular/platform-browser": ">=13.0.0",
"@angular/platform-browser-dynamic": ">=13.0.0",
"@angular-devkit/architect": ">=0.1400.0",
"@angular-devkit/build-angular": ">=14.0.0",
"@angular-devkit/core": ">=14.0.0",
"@angular/cli": ">=14.0.0",
"@angular/common": ">=14.0.0",
"@angular/compiler": ">=14.0.0",
"@angular/compiler-cli": ">=14.0.0",
"@angular/core": ">=14.0.0",
"@angular/forms": ">=14.0.0",
"@angular/platform-browser": ">=14.0.0",
"@angular/platform-browser-dynamic": ">=14.0.0",
"@babel/core": "*",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",

View File

@ -11,13 +11,10 @@ import { CLIOptions } from '@storybook/types';
import { catchError, map, mapTo, switchMap } from 'rxjs/operators';
import { sync as findUpSync } from 'find-up';
import { sync as readUpSync } from 'read-pkg-up';
import {
BrowserBuilderOptions,
ExtraEntryPoint,
StylePreprocessorOptions,
} from '@angular-devkit/build-angular';
import { BrowserBuilderOptions, StylePreprocessorOptions } from '@angular-devkit/build-angular';
import { buildStaticStandalone } from '@storybook/core-server';
import { StyleElement } from '@angular-devkit/build-angular/src/builders/browser/schema';
import { StandaloneOptions } from '../utils/standalone-options';
import { runCompodoc } from '../utils/run-compodoc';
import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-handler';
@ -28,7 +25,7 @@ export type StorybookBuilderOptions = JsonObject & {
docsMode: boolean;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
styles?: StyleElement[];
stylePreprocessorOptions?: StylePreprocessorOptions;
} & Pick<
// makes sure the option exists

View File

@ -61,7 +61,7 @@
"type": "array",
"description": "Global styles to be included in the build.",
"items": {
"$ref": "#/definitions/extraEntryPoint"
"$ref": "#/definitions/styleElement"
},
"default": ""
},
@ -83,7 +83,7 @@
},
"additionalProperties": false,
"definitions": {
"extraEntryPoint": {
"styleElement": {
"oneOf": [
{
"type": "object",

View File

@ -6,11 +6,7 @@ import {
targetFromTargetString,
} from '@angular-devkit/architect';
import { JsonObject } from '@angular-devkit/core';
import {
BrowserBuilderOptions,
ExtraEntryPoint,
StylePreprocessorOptions,
} from '@angular-devkit/build-angular';
import { BrowserBuilderOptions, StylePreprocessorOptions } from '@angular-devkit/build-angular';
import { from, Observable, of } from 'rxjs';
import { CLIOptions } from '@storybook/types';
import { map, switchMap, mapTo } from 'rxjs/operators';
@ -18,6 +14,7 @@ import { sync as findUpSync } from 'find-up';
import { sync as readUpSync } from 'read-pkg-up';
import { buildDevStandalone } from '@storybook/core-server';
import { StyleElement } from '@angular-devkit/build-angular/src/builders/browser/schema';
import { StandaloneOptions } from '../utils/standalone-options';
import { runCompodoc } from '../utils/run-compodoc';
import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-handler';
@ -28,7 +25,7 @@ export type StorybookBuilderOptions = JsonObject & {
docsMode: boolean;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
styles?: StyleElement[];
stylePreprocessorOptions?: StylePreprocessorOptions;
} & Pick<
// makes sure the option exists

View File

@ -83,7 +83,7 @@
"type": "array",
"description": "Global styles to be included in the build.",
"items": {
"$ref": "#/definitions/extraEntryPoint"
"$ref": "#/definitions/styleElement"
},
"default": ""
},
@ -105,7 +105,7 @@
},
"additionalProperties": false,
"definitions": {
"extraEntryPoint": {
"styleElement": {
"oneOf": [
{
"type": "object",

View File

@ -1,14 +1,15 @@
import { Options as CoreOptions } from '@storybook/types';
import { BuilderContext } from '@angular-devkit/architect';
import { ExtraEntryPoint, StylePreprocessorOptions } from '@angular-devkit/build-angular';
import { StylePreprocessorOptions } from '@angular-devkit/build-angular';
import { StyleElement } from '@angular-devkit/build-angular/src/builders/browser/schema';
export type PresetOptions = CoreOptions & {
/* Allow to get the options of a targeted "browser builder" */
angularBrowserTarget?: string | null;
/* Defined set of options. These will take over priority from angularBrowserTarget options */
angularBuilderOptions?: {
styles?: ExtraEntryPoint[];
styles?: StyleElement[];
stylePreprocessorOptions?: StylePreprocessorOptions;
};
/* Angular context from builder */

View File

@ -249,16 +249,6 @@ const baseTemplates = {
builder: '@storybook/builder-webpack5',
},
},
'angular-cli/13-ts': {
name: 'Angular CLI (Version 13)',
script:
'npx -p @angular/cli@13 ng new angular-v13 --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn',
expected: {
framework: '@storybook/angular',
renderer: '@storybook/angular',
builder: '@storybook/builder-webpack5',
},
},
'svelte-kit/skeleton-js': {
name: 'Svelte Kit (JS)',
script:
@ -421,7 +411,6 @@ export const merged: TemplateKey[] = [
'react-webpack/18-ts',
'react-webpack/17-ts',
'angular-cli/14-ts',
'angular-cli/13-ts',
'preact-webpack5/default-ts',
'preact-vite/default-ts',
'html-webpack/default',

File diff suppressed because it is too large Load Diff