Skip to content

Commit

Permalink
Only support Angular >= 14
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Jan 10, 2023
1 parent 820904e commit 23d7e7e
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 62 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
46 changes: 23 additions & 23 deletions code/frameworks/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"dependencies": {
"@storybook/builder-webpack5": "7.0.0-beta.21",
"@storybook/cli": "7.0.0-beta.21",
"@storybook/client-logger": "7.0.0-beta.21",
"@storybook/core-client": "7.0.0-beta.21",
"@storybook/core-common": "7.0.0-beta.21",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
9 changes: 3 additions & 6 deletions code/frameworks/angular/src/builders/build-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -27,7 +24,7 @@ export type StorybookBuilderOptions = JsonObject & {
tsConfig?: string;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
styles?: StyleElement[];
stylePreprocessorOptions?: StylePreprocessorOptions;
} & Pick<
// makes sure the option exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"type": "array",
"description": "Global styles to be included in the build.",
"items": {
"$ref": "#/definitions/extraEntryPoint"
"$ref": "#/definitions/styleElement"
},
"default": ""
},
Expand All @@ -83,7 +83,7 @@
},
"additionalProperties": false,
"definitions": {
"extraEntryPoint": {
"styleElement": {
"oneOf": [
{
"type": "object",
Expand Down
9 changes: 3 additions & 6 deletions code/frameworks/angular/src/builders/start-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ 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';
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';
Expand All @@ -27,7 +24,7 @@ export type StorybookBuilderOptions = JsonObject & {
tsConfig?: string;
compodoc: boolean;
compodocArgs: string[];
styles?: ExtraEntryPoint[];
styles?: StyleElement[];
stylePreprocessorOptions?: StylePreprocessorOptions;
} & Pick<
// makes sure the option exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"type": "array",
"description": "Global styles to be included in the build.",
"items": {
"$ref": "#/definitions/extraEntryPoint"
"$ref": "#/definitions/styleElement"
},
"default": ""
},
Expand All @@ -105,7 +105,7 @@
},
"additionalProperties": false,
"definitions": {
"extraEntryPoint": {
"styleElement": {
"oneOf": [
{
"type": "object",
Expand Down
5 changes: 3 additions & 2 deletions code/frameworks/angular/src/server/preset-options.ts
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
11 changes: 0 additions & 11 deletions code/lib/cli/src/repro-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,6 @@ export const allTemplates = {
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:
Expand Down Expand Up @@ -367,7 +357,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',
Expand Down

0 comments on commit 23d7e7e

Please sign in to comment.