From d5e9404b7a23787e6354394f158fd5aca3d21300 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 21 Nov 2021 21:14:44 -0500 Subject: [PATCH 01/14] Run unit tests on more node versions, mac, and windows --- .github/workflows/tests-unit.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index 43ea60fc73dd..03fa946109a1 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -4,13 +4,24 @@ on: [push] jobs: build: - name: Core Unit Tests - runs-on: ubuntu-latest + name: Core Unit Tests node-${{ matrix.node_version }}, ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + node_version: [12, 14, 16, 17] + include: + - os: macos-latest + node_version: 16 + - os: windows-latest + node_version: 16 + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Set node version to ${{ matrix.node_version }} + uses: actions/setup-node@v2 with: - node-version: "12.x" + node-version: ${{ matrix.node_version }} cache: yarn - name: install, bootstrap run: | From dcfdeb85cf147cbca0a6957a79242d57a319a9df Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 23 Nov 2021 16:17:48 -0500 Subject: [PATCH 02/14] Split some snapshots by windows/posix --- ...podoc.snapshot => compodoc-posix.snapshot} | 0 .../doc-button/compodoc-windows.snapshot | 1297 +++++++++++++++++ .../angular/angular-properties.test.ts | 6 +- jest.config.js | 3 + ...ev => cra-ts-essentials_manager-dev-posix} | 0 .../cra-ts-essentials_manager-dev-windows | 246 ++++ ...d => cra-ts-essentials_manager-prod-posix} | 0 .../cra-ts-essentials_manager-prod-windows | 246 ++++ ...ev => cra-ts-essentials_preview-dev-posix} | 0 .../cra-ts-essentials_preview-dev-windows | 490 +++++++ ...d => cra-ts-essentials_preview-prod-posix} | 0 .../cra-ts-essentials_preview-prod-windows | 507 +++++++ ...ev => html-kitchen-sink_manager-dev-posix} | 0 .../html-kitchen-sink_manager-dev-windows | 224 +++ ...d => html-kitchen-sink_manager-prod-posix} | 0 .../html-kitchen-sink_manager-prod-windows | 224 +++ ...ev => html-kitchen-sink_preview-dev-posix} | 0 .../html-kitchen-sink_preview-dev-windows | 468 ++++++ ...d => html-kitchen-sink_preview-prod-posix} | 0 .../html-kitchen-sink_preview-prod-windows | 465 ++++++ ...anager-dev => vue-3-cli_manager-dev-posix} | 0 .../vue-3-cli_manager-dev-windows | 225 +++ ...ager-prod => vue-3-cli_manager-prod-posix} | 0 .../vue-3-cli_manager-prod-windows | 225 +++ ...review-dev => vue-3-cli_preview-dev-posix} | 0 .../vue-3-cli_preview-dev-windows | 508 +++++++ ...view-prod => vue-3-cli_preview-prod-posix} | 0 .../vue-3-cli_preview-prod-windows | 505 +++++++ ...components-kitchen-sink_manager-dev-posix} | 0 ...omponents-kitchen-sink_manager-dev-windows | 225 +++ ...omponents-kitchen-sink_manager-prod-posix} | 0 ...mponents-kitchen-sink_manager-prod-windows | 225 +++ ...components-kitchen-sink_preview-dev-posix} | 0 ...omponents-kitchen-sink_preview-dev-windows | 505 +++++++ ...omponents-kitchen-sink_preview-prod-posix} | 0 ...mponents-kitchen-sink_preview-prod-windows | 502 +++++++ lib/core-server/src/core-presets.test.ts | 10 +- ...st.js.injectStoryParameters-posix.snapshot | 14 + ....js.injectStoryParameters-windows.snapshot | 14 + ...ject-decorator.csf.test.js.posix.snapshot} | 13 - ...ect-decorator.csf.test.js.windows.snapshot | 36 + .../inject-decorator.csf.test.js | 17 +- 42 files changed, 7179 insertions(+), 21 deletions(-) rename addons/docs/src/frameworks/angular/__testfixtures__/doc-button/{compodoc.snapshot => compodoc-posix.snapshot} (100%) create mode 100644 addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-windows.snapshot rename lib/core-server/src/__snapshots__/{cra-ts-essentials_manager-dev => cra-ts-essentials_manager-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows rename lib/core-server/src/__snapshots__/{cra-ts-essentials_manager-prod => cra-ts-essentials_manager-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows rename lib/core-server/src/__snapshots__/{cra-ts-essentials_preview-dev => cra-ts-essentials_preview-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows rename lib/core-server/src/__snapshots__/{cra-ts-essentials_preview-prod => cra-ts-essentials_preview-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows rename lib/core-server/src/__snapshots__/{html-kitchen-sink_manager-dev => html-kitchen-sink_manager-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows rename lib/core-server/src/__snapshots__/{html-kitchen-sink_manager-prod => html-kitchen-sink_manager-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows rename lib/core-server/src/__snapshots__/{html-kitchen-sink_preview-dev => html-kitchen-sink_preview-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows rename lib/core-server/src/__snapshots__/{html-kitchen-sink_preview-prod => html-kitchen-sink_preview-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows rename lib/core-server/src/__snapshots__/{vue-3-cli_manager-dev => vue-3-cli_manager-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows rename lib/core-server/src/__snapshots__/{vue-3-cli_manager-prod => vue-3-cli_manager-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows rename lib/core-server/src/__snapshots__/{vue-3-cli_preview-dev => vue-3-cli_preview-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows rename lib/core-server/src/__snapshots__/{vue-3-cli_preview-prod => vue-3-cli_preview-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows rename lib/core-server/src/__snapshots__/{web-components-kitchen-sink_manager-dev => web-components-kitchen-sink_manager-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows rename lib/core-server/src/__snapshots__/{web-components-kitchen-sink_manager-prod => web-components-kitchen-sink_manager-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows rename lib/core-server/src/__snapshots__/{web-components-kitchen-sink_preview-dev => web-components-kitchen-sink_preview-dev-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows rename lib/core-server/src/__snapshots__/{web-components-kitchen-sink_preview-prod => web-components-kitchen-sink_preview-prod-posix} (100%) create mode 100644 lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows create mode 100644 lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.injectStoryParameters-posix.snapshot create mode 100644 lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.injectStoryParameters-windows.snapshot rename lib/source-loader/src/abstract-syntax-tree/__snapshots__/{inject-decorator.csf.test.js.snap => inject-decorator.csf.test.js.posix.snapshot} (69%) create mode 100644 lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.windows.snapshot diff --git a/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc.snapshot b/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-posix.snapshot similarity index 100% rename from addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc.snapshot rename to addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-posix.snapshot diff --git a/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-windows.snapshot b/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-windows.snapshot new file mode 100644 index 000000000000..87b561823850 --- /dev/null +++ b/addons/docs/src/frameworks/angular/__testfixtures__/doc-button/compodoc-windows.snapshot @@ -0,0 +1,1297 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`angular component properties doc-button 1`] = ` +Object { + "classes": Array [], + "components": Array [ + Object { + "accessors": Object { + "inputValue": Object { + "getSignature": Object { + "description": "

Getter for inputValue.

+", + "line": 115, + "name": "inputValue", + "rawdescription": "Getter for \`inputValue\`.", + "returnType": "", + "type": "", + }, + "name": "inputValue", + "setSignature": Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "value", + "type": "string", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Setter for inputValue that is also an @Input.

+", + "jsdoctags": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "value", + "tagName": Object { + "text": "param", + }, + "type": "string", + }, + ], + "line": 110, + "name": "inputValue", + "rawdescription": "Setter for \`inputValue\` that is also an \`@Input\`.", + "returnType": "void", + "type": "void", + }, + }, + "item": Object { + "name": "item", + "setSignature": Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "item", + "type": "T[]", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "item", + "tagName": Object { + "text": "param", + }, + "type": "T[]", + }, + ], + "line": 195, + "name": "item", + "returnType": "void", + "type": "void", + }, + }, + "value": Object { + "getSignature": Object { + "description": "

Get the private value.

+", + "line": 154, + "name": "value", + "rawdescription": "Get the private value.", + "returnType": "string | number", + "type": "", + }, + "name": "value", + "setSignature": Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "value", + "type": "string | number", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

Set the private value.

+", + "jsdoctags": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "value", + "tagName": Object { + "text": "param", + }, + "type": "string | number", + }, + ], + "line": 149, + "name": "value", + "rawdescription": "Set the private value.", + "returnType": "void", + "type": "void", + }, + }, + }, + "assetsDirs": Array [], + "deprecated": false, + "deprecationMessage": "", + "description": "

This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular.

+

It supports markdown, so you can embed formatted text, +like bold, italic, and inline code.

+
+

How you like dem apples?! It's never been easier to document all your components.

+
+", + "encapsulation": Array [], + "entryComponents": Array [], + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "hostBindings": Array [ + Object { + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "line": 124, + "name": "class.focused", + "type": "boolean", + }, + ], + "hostListeners": Array [ + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "btn", + "type": "", + }, + ], + "argsDecorator": Array [ + "$event.target", + ], + "deprecated": false, + "deprecationMessage": "", + "line": 120, + "name": "click", + }, + ], + "id": "component-InputComponent-fd2eff3e4da750f1c06d4928670993b3", + "inputs": Array [], + "inputsClass": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "

Specify the accent-type of the button

+", + "line": 56, + "name": "accent", + "rawdescription": "Specify the accent-type of the button", + "type": "ButtonAccent", + }, + Object { + "defaultValue": "'secondary'", + "deprecated": false, + "deprecationMessage": "", + "description": "

Appearance style of the button.

+", + "line": 52, + "name": "appearance", + "rawdescription": "Appearance style of the button.", + "type": "\\"primary\\" | \\"secondary\\"", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "

Setter for inputValue that is also an @Input.

+", + "line": 110, + "name": "inputValue", + "rawdescription": "Setter for \`inputValue\` that is also an \`@Input\`.", + "type": "string", + }, + Object { + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "description": "

Sets the button to a disabled state.

+", + "line": 60, + "name": "isDisabled", + "rawdescription": "Sets the button to a disabled state.", + "type": "boolean", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "line": 195, + "name": "item", + "type": "[]", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "

The inner text of the button.

+", + "jsdoctags": Array [ + Object { + "comment": "", + "end": 1590, + "flags": 4227072, + "kind": 317, + "modifierFlagsCache": 0, + "pos": 1576, + "tagName": Object { + "end": 1585, + "escapedText": "required", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 1577, + "transformFlags": 0, + }, + "transformFlags": 0, + }, + ], + "line": 68, + "name": "label", + "rawdescription": "The inner text of the button.", + "type": "string", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "line": 192, + "name": "showKeyAlias", + "type": "", + }, + Object { + "defaultValue": "'medium'", + "deprecated": false, + "deprecationMessage": "", + "description": "

Size of the button.

+", + "line": 72, + "name": "size", + "rawdescription": "Size of the button.", + "type": "ButtonSize", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "

Specifies some arbitrary object

+", + "line": 75, + "name": "someDataObject", + "rawdescription": "Specifies some arbitrary object", + "type": "ISomeInterface", + }, + Object { + "defaultValue": "false", + "deprecated": true, + "deprecationMessage": "", + "description": "

Some input you shouldn't use.

+", + "jsdoctags": Array [ + Object { + "comment": "", + "end": 1882, + "flags": 4227072, + "kind": 321, + "modifierFlagsCache": 0, + "pos": 1866, + "tagName": Object { + "end": 1877, + "escapedText": "deprecated", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 1867, + "transformFlags": 0, + }, + "transformFlags": 0, + }, + ], + "line": 83, + "name": "somethingYouShouldNotUse", + "rawdescription": "Some input you shouldn't use.", + "type": "boolean", + }, + ], + "methodsClass": Array [ + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "x", + "type": "number", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "y", + "type": "string | number", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

An internal calculation method which adds x and y together.

+", + "jsdoctags": Array [ + Object { + "comment": "

Some number you'd like to use.

+", + "deprecated": false, + "deprecationMessage": "", + "name": Object { + "end": 3678, + "escapedText": "x", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 3677, + "transformFlags": 0, + }, + "tagName": Object { + "end": 3676, + "escapedText": "param", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 3671, + "transformFlags": 0, + }, + "type": "number", + }, + Object { + "comment": "

Some other number or string you'd like to use, will have parseInt() applied before calculation.

+", + "deprecated": false, + "deprecationMessage": "", + "name": Object { + "end": 3724, + "escapedText": "y", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 3723, + "transformFlags": 0, + }, + "tagName": Object { + "end": 3722, + "escapedText": "param", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 3717, + "transformFlags": 0, + }, + "type": "string | number", + }, + ], + "line": 164, + "modifierKind": Array [ + 122, + ], + "name": "calc", + "optional": false, + "rawdescription": " + +An internal calculation method which adds \`x\` and \`y\` together. + +", + "returnType": "number", + "typeParameters": Array [], + }, + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "btn", + "type": "", + }, + ], + "decorators": Array [ + Object { + "name": "HostListener", + "stringifiedArguments": "'click', ['$event.target']", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "jsdoctags": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "btn", + "tagName": Object { + "text": "param", + }, + "type": "", + }, + ], + "line": 120, + "name": "onClickListener", + "optional": false, + "returnType": "void", + "typeParameters": Array [], + }, + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "password", + "type": "string", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

A private method.

+", + "jsdoctags": Array [ + Object { + "comment": "

Some password.

+", + "deprecated": false, + "deprecationMessage": "", + "name": Object { + "end": 4263, + "escapedText": "password", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 4255, + "transformFlags": 0, + }, + "tagName": Object { + "end": 4254, + "escapedText": "param", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 4249, + "transformFlags": 0, + }, + "type": "string", + }, + ], + "line": 187, + "modifierKind": Array [ + 120, + ], + "name": "privateMethod", + "optional": false, + "rawdescription": " + +A private method. + +", + "returnType": "void", + "typeParameters": Array [], + }, + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "id", + "optional": true, + "type": "number", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

A protected method.

+", + "jsdoctags": Array [ + Object { + "comment": "

Some id.

+", + "deprecated": false, + "deprecationMessage": "", + "name": Object { + "end": 4113, + "escapedText": "id", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 4111, + "transformFlags": 0, + }, + "optional": true, + "tagName": Object { + "end": 4110, + "escapedText": "param", + "flags": 4227072, + "kind": 78, + "modifierFlagsCache": 0, + "pos": 4105, + "transformFlags": 0, + }, + "type": "number", + }, + ], + "line": 178, + "modifierKind": Array [ + 121, + ], + "name": "protectedMethod", + "optional": false, + "rawdescription": " + +A protected method. + +", + "returnType": "void", + "typeParameters": Array [], + }, + Object { + "args": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "things", + "type": "ISomeInterface", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "

A public method using an interface.

+", + "jsdoctags": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "things", + "tagName": Object { + "text": "param", + }, + "type": "ISomeInterface", + }, + ], + "line": 169, + "modifierKind": Array [ + 122, + ], + "name": "publicMethod", + "optional": false, + "rawdescription": " +A public method using an interface.", + "returnType": "void", + "typeParameters": Array [], + }, + ], + "name": "InputComponent", + "outputs": Array [], + "outputsClass": Array [ + Object { + "defaultValue": "new EventEmitter()", + "deprecated": false, + "deprecationMessage": "", + "description": "

Handler to be called when the button is clicked by a user.

+

Will also block the emission of the event if isDisabled is true.

+", + "line": 91, + "name": "onClick", + "rawdescription": " + +Handler to be called when the button is clicked by a user. + +Will also block the emission of the event if \`isDisabled\` is true. +", + "type": "EventEmitter", + }, + ], + "propertiesClass": Array [ + Object { + "defaultValue": "'some value'", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 106, + "modifierKind": Array [ + 120, + ], + "name": "_inputValue", + "optional": false, + "type": "string", + }, + Object { + "defaultValue": "'Private hello'", + "deprecated": false, + "deprecationMessage": "", + "description": "

Private value.

+", + "line": 146, + "modifierKind": Array [ + 120, + ], + "name": "_value", + "optional": false, + "rawdescription": " +Private value.", + "type": "string", + }, + Object { + "decorators": Array [ + Object { + "name": "ViewChild", + "stringifiedArguments": "'buttonRef', {static: false}", + }, + ], + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 48, + "name": "buttonRef", + "optional": false, + "type": "ElementRef", + }, + Object { + "decorators": Array [ + Object { + "name": "HostBinding", + "stringifiedArguments": "'class.focused'", + }, + ], + "defaultValue": "false", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 124, + "name": "focus", + "optional": false, + "type": "", + }, + Object { + "defaultValue": "'Public hello'", + "deprecated": false, + "deprecationMessage": "", + "description": "

Public value.

+", + "line": 143, + "modifierKind": Array [ + 122, + ], + "name": "internalProperty", + "optional": false, + "rawdescription": " +Public value.", + "type": "string", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 199, + "modifierKind": Array [ + 122, + ], + "name": "processedItem", + "optional": false, + "type": "T[]", + }, + ], + "providers": Array [], + "rawdescription": " + +This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular. + +It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text, +like **bold**, _italic_, and \`inline code\`. + +> How you like dem apples?! It's never been easier to document all your components. + +", + "selector": "doc-button", + "sourceCode": "import { + Component, + ElementRef, + EventEmitter, + HostBinding, + HostListener, + Input, + Output, + ViewChild, +} from '@angular/core'; + +export const exportedConstant = 'An exported constant'; + +export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge'; + +export enum ButtonAccent { + 'Normal' = 'Normal', + 'High' = 'High', +} + +export interface ISomeInterface { + one: string; + two: boolean; + three: any[]; +} + +/** + * This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular. + * + * It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text, + * like **bold**, _italic_, and \`inline code\`. + * + * > How you like dem apples?! It's never been easier to document all your components. + * + * @string Hello world + * @link [Example](http://example.com) + * @code \`ThingThing\` + * @html aaa + */ +@Component({ + selector: 'doc-button', + template: '', +}) +export class InputComponent { + @ViewChild('buttonRef', { static: false }) buttonRef: ElementRef; + + /** Appearance style of the button. */ + @Input() + public appearance: 'primary' | 'secondary' = 'secondary'; + + /** Specify the accent-type of the button */ + @Input() + public accent: ButtonAccent; + + /** Sets the button to a disabled state. */ + @Input() + public isDisabled = false; + + /** + * The inner text of the button. + * + * @required + */ + @Input() + public label: string; + + /** Size of the button. */ + @Input() + public size?: ButtonSize = 'medium'; + + /** Specifies some arbitrary object */ + @Input() public someDataObject: ISomeInterface; + + /** + * Some input you shouldn't use. + * + * @deprecated + */ + @Input() + public somethingYouShouldNotUse = false; + + /** + * Handler to be called when the button is clicked by a user. + * + * Will also block the emission of the event if \`isDisabled\` is true. + */ + @Output() + public onClick = new EventEmitter(); + + /** + * This is an internal method that we don't want to document and have added the \`ignore\` annotation to. + * + * @ignore + */ + public handleClick(event: Event) { + event.stopPropagation(); + + if (!this.isDisabled) { + this.onClick.emit(event); + } + } + + private _inputValue = 'some value'; + + /** Setter for \`inputValue\` that is also an \`@Input\`. */ + @Input() + public set inputValue(value: string) { + this._inputValue = value; + } + + /** Getter for \`inputValue\`. */ + public get inputValue() { + return this._inputValue; + } + + @HostListener('click', ['$event.target']) + onClickListener(btn) { + console.log('button', btn); + } + + @HostBinding('class.focused') focus = false; + + /** + * Returns all the CSS classes for the button. + * + * @ignore + */ + public get classes(): string[] { + return [this.appearance, this.size] + .filter((_class) => !!_class) + .map((_class) => \`btn-\${_class}\`); + } + + /** + * @ignore + */ + public ignoredProperty = 'Ignore me'; + + /** Public value. */ + public internalProperty = 'Public hello'; + + /** Private value. */ + private _value = 'Private hello'; + + /** Set the private value. */ + public set value(value: string | number) { + this._value = \`\${value}\`; + } + + /** Get the private value. */ + public get value(): string | number { + return this._value; + } + + /** + * An internal calculation method which adds \`x\` and \`y\` together. + * + * @param x Some number you'd like to use. + * @param y Some other number or string you'd like to use, will have \`parseInt()\` applied before calculation. + */ + public calc(x: number, y: string | number): number { + return x + parseInt(\`\${y}\`, 10); + } + + /** A public method using an interface. */ + public publicMethod(things: ISomeInterface) { + console.log(things); + } + + /** + * A protected method. + * + * @param id Some \`id\`. + */ + protected protectedMethod(id?: number) { + console.log(id); + } + + /** + * A private method. + * + * @param password Some \`password\`. + */ + private privateMethod(password: string) { + console.log(password); + } + + @Input('showKeyAlias') + public showKey: keyof T; + + @Input() + public set item(item: T[]) { + this.processedItem = item; + } + + public processedItem: T[]; +} +", + "styleUrls": Array [], + "styleUrlsData": "", + "styles": Array [], + "stylesData": "", + "template": "", + "templateUrl": Array [], + "type": "component", + "viewProviders": Array [], + }, + ], + "coverage": Object { + "count": 21, + "files": Array [ + Object { + "coverageCount": "16/25", + "coveragePercent": 64, + "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "linktype": "component", + "name": "InputComponent", + "status": "good", + "type": "component", + }, + Object { + "coverageCount": "0/4", + "coveragePercent": 0, + "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "linktype": "interface", + "name": "ISomeInterface", + "status": "low", + "type": "interface", + }, + Object { + "coverageCount": "0/1", + "coveragePercent": 0, + "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "linksubtype": "variable", + "linktype": "miscellaneous", + "name": "exportedConstant", + "status": "low", + "type": "variable", + }, + ], + "status": "low", + }, + "directives": Array [], + "guards": Array [], + "injectables": Array [], + "interceptors": Array [], + "interfaces": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "id": "interface-ISomeInterface-fd2eff3e4da750f1c06d4928670993b3", + "indexSignatures": Array [], + "kind": 163, + "methods": Array [], + "name": "ISomeInterface", + "properties": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 25, + "name": "one", + "optional": false, + "type": "string", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 27, + "name": "three", + "optional": false, + "type": "any[]", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "description": "", + "line": 26, + "name": "two", + "optional": false, + "type": "boolean", + }, + ], + "sourceCode": "import { + Component, + ElementRef, + EventEmitter, + HostBinding, + HostListener, + Input, + Output, + ViewChild, +} from '@angular/core'; + +export const exportedConstant = 'An exported constant'; + +export type ButtonSize = 'small' | 'medium' | 'large' | 'xlarge'; + +export enum ButtonAccent { + 'Normal' = 'Normal', + 'High' = 'High', +} + +export interface ISomeInterface { + one: string; + two: boolean; + three: any[]; +} + +/** + * This is a simple button that demonstrates various JSDoc handling in Storybook Docs for Angular. + * + * It supports [markdown](https://en.wikipedia.org/wiki/Markdown), so you can embed formatted text, + * like **bold**, _italic_, and \`inline code\`. + * + * > How you like dem apples?! It's never been easier to document all your components. + * + * @string Hello world + * @link [Example](http://example.com) + * @code \`ThingThing\` + * @html aaa + */ +@Component({ + selector: 'doc-button', + template: '', +}) +export class InputComponent { + @ViewChild('buttonRef', { static: false }) buttonRef: ElementRef; + + /** Appearance style of the button. */ + @Input() + public appearance: 'primary' | 'secondary' = 'secondary'; + + /** Specify the accent-type of the button */ + @Input() + public accent: ButtonAccent; + + /** Sets the button to a disabled state. */ + @Input() + public isDisabled = false; + + /** + * The inner text of the button. + * + * @required + */ + @Input() + public label: string; + + /** Size of the button. */ + @Input() + public size?: ButtonSize = 'medium'; + + /** Specifies some arbitrary object */ + @Input() public someDataObject: ISomeInterface; + + /** + * Some input you shouldn't use. + * + * @deprecated + */ + @Input() + public somethingYouShouldNotUse = false; + + /** + * Handler to be called when the button is clicked by a user. + * + * Will also block the emission of the event if \`isDisabled\` is true. + */ + @Output() + public onClick = new EventEmitter(); + + /** + * This is an internal method that we don't want to document and have added the \`ignore\` annotation to. + * + * @ignore + */ + public handleClick(event: Event) { + event.stopPropagation(); + + if (!this.isDisabled) { + this.onClick.emit(event); + } + } + + private _inputValue = 'some value'; + + /** Setter for \`inputValue\` that is also an \`@Input\`. */ + @Input() + public set inputValue(value: string) { + this._inputValue = value; + } + + /** Getter for \`inputValue\`. */ + public get inputValue() { + return this._inputValue; + } + + @HostListener('click', ['$event.target']) + onClickListener(btn) { + console.log('button', btn); + } + + @HostBinding('class.focused') focus = false; + + /** + * Returns all the CSS classes for the button. + * + * @ignore + */ + public get classes(): string[] { + return [this.appearance, this.size] + .filter((_class) => !!_class) + .map((_class) => \`btn-\${_class}\`); + } + + /** + * @ignore + */ + public ignoredProperty = 'Ignore me'; + + /** Public value. */ + public internalProperty = 'Public hello'; + + /** Private value. */ + private _value = 'Private hello'; + + /** Set the private value. */ + public set value(value: string | number) { + this._value = \`\${value}\`; + } + + /** Get the private value. */ + public get value(): string | number { + return this._value; + } + + /** + * An internal calculation method which adds \`x\` and \`y\` together. + * + * @param x Some number you'd like to use. + * @param y Some other number or string you'd like to use, will have \`parseInt()\` applied before calculation. + */ + public calc(x: number, y: string | number): number { + return x + parseInt(\`\${y}\`, 10); + } + + /** A public method using an interface. */ + public publicMethod(things: ISomeInterface) { + console.log(things); + } + + /** + * A protected method. + * + * @param id Some \`id\`. + */ + protected protectedMethod(id?: number) { + console.log(id); + } + + /** + * A private method. + * + * @param password Some \`password\`. + */ + private privateMethod(password: string) { + console.log(password); + } + + @Input('showKeyAlias') + public showKey: keyof T; + + @Input() + public set item(item: T[]) { + this.processedItem = item; + } + + public processedItem: T[]; +} +", + "type": "interface", + }, + ], + "miscellaneous": Object { + "enumerations": Array [ + Object { + "childs": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "Normal", + "value": "Normal", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "High", + "value": "High", + }, + ], + "ctype": "miscellaneous", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "name": "ButtonAccent", + "subtype": "enum", + }, + ], + "functions": Array [], + "groupedEnumerations": Object { + "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + Object { + "childs": Array [ + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "Normal", + "value": "Normal", + }, + Object { + "deprecated": false, + "deprecationMessage": "", + "name": "High", + "value": "High", + }, + ], + "ctype": "miscellaneous", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "name": "ButtonAccent", + "subtype": "enum", + }, + ], + }, + "groupedFunctions": Object {}, + "groupedTypeAliases": Object { + "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + Object { + "ctype": "miscellaneous", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "kind": 183, + "name": "ButtonSize", + "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", + "subtype": "typealias", + }, + ], + }, + "groupedVariables": Object { + "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + Object { + "ctype": "miscellaneous", + "defaultValue": "'An exported constant'", + "deprecated": false, + "deprecationMessage": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "name": "exportedConstant", + "subtype": "variable", + "type": "string", + }, + ], + }, + "typealiases": Array [ + Object { + "ctype": "miscellaneous", + "deprecated": false, + "deprecationMessage": "", + "description": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "kind": 183, + "name": "ButtonSize", + "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", + "subtype": "typealias", + }, + ], + "variables": Array [ + Object { + "ctype": "miscellaneous", + "defaultValue": "'An exported constant'", + "deprecated": false, + "deprecationMessage": "", + "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "name": "exportedConstant", + "subtype": "variable", + "type": "string", + }, + ], + }, + "modules": Array [], + "pipes": Array [], + "routes": Array [], +} +`; diff --git a/addons/docs/src/frameworks/angular/angular-properties.test.ts b/addons/docs/src/frameworks/angular/angular-properties.test.ts index 28789a4edea4..47ce7b685495 100644 --- a/addons/docs/src/frameworks/angular/angular-properties.test.ts +++ b/addons/docs/src/frameworks/angular/angular-properties.test.ts @@ -6,6 +6,8 @@ import { sync as spawnSync } from 'cross-spawn'; import { findComponentByName, extractArgTypesFromData } from './compodoc'; +const { SNAPSHOT_OS } = global; + // File hierarchy: __testfixtures__ / some-test-case / input.* const inputRegExp = /^input\..*$/; @@ -42,7 +44,9 @@ describe('angular component properties', () => { // snapshot the output of compodoc const compodocOutput = runCompodoc(inputPath); const compodocJson = JSON.parse(compodocOutput); - expect(compodocJson).toMatchSpecificSnapshot(path.join(testDir, 'compodoc.snapshot')); + expect(compodocJson).toMatchSpecificSnapshot( + path.join(testDir, `compodoc-${SNAPSHOT_OS}.snapshot`) + ); // snapshot the output of addon-docs angular-properties const componentData = findComponentByName('InputComponent', compodocJson); diff --git a/jest.config.js b/jest.config.js index 2caf8ee5a90e..b0ddc913094d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,5 @@ +const os = require('os'); + module.exports = { cacheDirectory: '.cache/jest', clearMocks: true, @@ -81,6 +83,7 @@ module.exports = { globals: { DOCS_MODE: false, PREVIEW_URL: undefined, + SNAPSHOT_OS: os.platform() === 'win32' ? 'windows' : 'posix', }, snapshotSerializers: ['jest-emotion', 'enzyme-to-json/serializer', 'jest-serializer-html'], coverageDirectory: 'coverage', diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev rename to lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows new file mode 100644 index 000000000000..86a38bc04d08 --- /dev/null +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows @@ -0,0 +1,246 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cra-ts-essentials manager dev mode 1`] = ` +Object { + "entry": Array [ + "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + Object { + "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod rename to lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows new file mode 100644 index 000000000000..ecdf3b1d7beb --- /dev/null +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows @@ -0,0 +1,246 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cra-ts-essentials manager production mode 1`] = ` +Object { + "entry": Array [ + "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + Object { + "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev rename to lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows new file mode 100644 index 000000000000..764ac349ad57 --- /dev/null +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows @@ -0,0 +1,490 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cra-ts-essentials preview dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "NODE_MODULES\\\\webpack-hot-middleware\\\\client.js?reload=true&quiet=false&noInfo=undefined", + "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\react\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\react\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "parser": Object { + "requireEnsure": false, + }, + }, + Object { + "oneOf": Array [ + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "mimetype": "image/avif", + "name": "static/media/[name].[hash:8].[ext]", + }, + "test": Array [ + "/\\\\.avif$/", + ], + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[hash:8].[ext]", + }, + "test": Array [ + "/\\\\.bmp$/", + "/\\\\.gif$/", + "/\\\\.jpe?g$/", + "/\\\\.png$/", + ], + }, + Object { + "include": Array [ + "ROOT\\\\src", + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook", + ], + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheCompression": false, + "cacheDirectory": true, + "cacheIdentifier": "development:babel-plugin-named-asset-import@0.3.7:babel-preset-react-app@10.0.0:react-dev-utils@11.0.3:react-scripts@4.0.3", + "compact": false, + "configFile": false, + "customize": "NODE_MODULES\\\\babel-preset-react-app\\\\webpack-overrides.js", + "extends": undefined, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-named-asset-import\\\\index.js", + Object { + "loaderMap": Object { + "svg": Object { + "ReactComponent": "@svgr/webpack?-svgo,+titleProp,+ref![path]", + }, + }, + }, + ], + "NODE_MODULES\\\\react-refresh\\\\babel.js", + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + Array [ + "NODE_MODULES\\\\babel-preset-react-app\\\\index.js", + Object { + "runtime": "automatic", + }, + ], + ], + }, + "test": "/\\\\.(js|mjs|jsx|ts|tsx)$/", + }, + Object { + "exclude": "/@babel(?:\\\\/|\\\\\\\\{1,2})runtime/", + "include": Array [ + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook", + ], + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheCompression": false, + "cacheDirectory": true, + "cacheIdentifier": "development:babel-plugin-named-asset-import@0.3.7:babel-preset-react-app@10.0.0:react-dev-utils@11.0.3:react-scripts@4.0.3", + "compact": false, + "configFile": false, + "inputSourceMap": true, + "presets": Array [ + Array [ + "NODE_MODULES\\\\babel-preset-react-app\\\\dependencies.js", + Object { + "helpers": true, + }, + ], + ], + "sourceMaps": true, + }, + "test": "/\\\\.(js|mjs)$/", + }, + Object { + "exclude": Array [ + "/\\\\.module\\\\.css$/", + "/@storybook/", + ], + "include": undefined, + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + ], + }, + Object { + "test": "/\\\\.module\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + "modules": Object { + "getLocalIdent": [Function], + }, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + ], + }, + Object { + "exclude": "/\\\\.module\\\\.(scss|sass)$/", + "sideEffects": true, + "test": "/\\\\.(scss|sass)$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 3, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\resolve-url-loader\\\\index.js", + "options": Object { + "root": "ROOT\\\\src", + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\sass-loader\\\\dist\\\\cjs.js", + "options": Object { + "sourceMap": true, + }, + }, + ], + }, + Object { + "test": "/\\\\.module\\\\.(scss|sass)$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 3, + "modules": Object { + "getLocalIdent": [Function], + }, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\resolve-url-loader\\\\index.js", + "options": Object { + "root": "ROOT\\\\src", + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\sass-loader\\\\dist\\\\cjs.js", + "options": Object { + "sourceMap": true, + }, + }, + ], + }, + Object { + "exclude": Array [ + "/\\\\.(js|mjs|jsx|ts|tsx)$/", + "/\\\\.html$/", + "/\\\\.json$/", + "/\\\\.(ejs|md|mdx)$/", + ], + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[hash:8].[ext]", + }, + }, + ], + }, + Object { + "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "WatchMissingNodeModulesPlugin", + "HotModuleReplacementPlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + "InterpolateHtmlPlugin", + "ModuleNotFoundPlugin", + "ReactRefreshPlugin", + "ManifestPlugin", + "IgnorePlugin", + "ForkTsCheckerWebpackPlugin", + "ESLintWebpackPlugin", + "DocgenPlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod rename to lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows new file mode 100644 index 000000000000..3ac95e0165b1 --- /dev/null +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows @@ -0,0 +1,507 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cra-ts-essentials preview production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\react\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\react\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "parser": Object { + "requireEnsure": false, + }, + }, + Object { + "oneOf": Array [ + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "mimetype": "image/avif", + "name": "static/media/[name].[hash:8].[ext]", + }, + "test": Array [ + "/\\\\.avif$/", + ], + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[hash:8].[ext]", + }, + "test": Array [ + "/\\\\.bmp$/", + "/\\\\.gif$/", + "/\\\\.jpe?g$/", + "/\\\\.png$/", + ], + }, + Object { + "include": Array [ + "ROOT\\\\src", + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook", + ], + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheCompression": false, + "cacheDirectory": true, + "cacheIdentifier": "production:babel-plugin-named-asset-import@0.3.7:babel-preset-react-app@10.0.0:react-dev-utils@11.0.3:react-scripts@4.0.3", + "compact": true, + "configFile": false, + "customize": "NODE_MODULES\\\\babel-preset-react-app\\\\webpack-overrides.js", + "extends": undefined, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-named-asset-import\\\\index.js", + Object { + "loaderMap": Object { + "svg": Object { + "ReactComponent": "@svgr/webpack?-svgo,+titleProp,+ref![path]", + }, + }, + }, + ], + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + Array [ + "NODE_MODULES\\\\babel-preset-react-app\\\\index.js", + Object { + "runtime": "automatic", + }, + ], + ], + }, + "test": "/\\\\.(js|mjs|jsx|ts|tsx)$/", + }, + Object { + "exclude": "/@babel(?:\\\\/|\\\\\\\\{1,2})runtime/", + "include": Array [ + "ROOT\\\\examples\\\\cra-ts-essentials\\\\.storybook", + ], + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheCompression": false, + "cacheDirectory": true, + "cacheIdentifier": "production:babel-plugin-named-asset-import@0.3.7:babel-preset-react-app@10.0.0:react-dev-utils@11.0.3:react-scripts@4.0.3", + "compact": false, + "configFile": false, + "inputSourceMap": true, + "presets": Array [ + Array [ + "NODE_MODULES\\\\babel-preset-react-app\\\\dependencies.js", + Object { + "helpers": true, + }, + ], + ], + "sourceMaps": true, + }, + "test": "/\\\\.(js|mjs)$/", + }, + Object { + "exclude": Array [ + "/\\\\.module\\\\.css$/", + "/@storybook/", + ], + "include": undefined, + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\mini-css-extract-plugin\\\\dist\\\\loader.js", + "options": Object { + "publicPath": "../../", + }, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + ], + }, + Object { + "test": "/\\\\.module\\\\.css$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\mini-css-extract-plugin\\\\dist\\\\loader.js", + "options": Object { + "publicPath": "../../", + }, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + "modules": Object { + "getLocalIdent": [Function], + }, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + ], + }, + Object { + "exclude": "/\\\\.module\\\\.(scss|sass)$/", + "sideEffects": true, + "test": "/\\\\.(scss|sass)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\mini-css-extract-plugin\\\\dist\\\\loader.js", + "options": Object { + "publicPath": "../../", + }, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 3, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\resolve-url-loader\\\\index.js", + "options": Object { + "root": "ROOT\\\\src", + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\sass-loader\\\\dist\\\\cjs.js", + "options": Object { + "sourceMap": true, + }, + }, + ], + }, + Object { + "test": "/\\\\.module\\\\.(scss|sass)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\mini-css-extract-plugin\\\\dist\\\\loader.js", + "options": Object { + "publicPath": "../../", + }, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 3, + "modules": Object { + "getLocalIdent": [Function], + }, + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\src\\\\index.js", + "options": Object { + "ident": "postcss", + "plugins": [Function], + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\resolve-url-loader\\\\index.js", + "options": Object { + "root": "ROOT\\\\src", + "sourceMap": true, + }, + }, + Object { + "loader": "NODE_MODULES\\\\sass-loader\\\\dist\\\\cjs.js", + "options": Object { + "sourceMap": true, + }, + }, + ], + }, + Object { + "exclude": Array [ + "/\\\\.(js|mjs|jsx|ts|tsx)$/", + "/\\\\.html$/", + "/\\\\.json$/", + "/\\\\.(ejs|md|mdx)$/", + ], + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[hash:8].[ext]", + }, + }, + ], + }, + Object { + "include": "NODE_MODULES[\\\\\\\\/](@storybook[\\\\\\\\/]node_logger|@testing-library[\\\\\\\\/]dom|@testing-library[\\\\\\\\/]user-event|acorn-jsx|ansi-align|ansi-colors|ansi-escapes|ansi-regex|ansi-styles|better-opn|boxen|camelcase|chalk|color-convert|commander|find-cache-dir|find-up|fs-extra|highlight.js|json5|node-fetch|pkg-dir|prettier|pretty-format|react-dev-utils|resolve-from|semver|slash|strip-ansi|uuid)/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "overrides": Array [ + Object { + "plugins": Array [ + Array [ + "NODE_MODULES\\\\babel-plugin-react-docgen\\\\lib\\\\index.js", + Object { + "DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", + }, + ], + ], + "test": "/\\\\.(mjs|jsx?)$/", + }, + ], + "plugins": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "@babel/preset-env", + Object { + "targets": Object { + "ie": "11", + }, + }, + "storybook-addon-ie11", + ], + ], + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + "InlineChunkHtmlPlugin", + "InterpolateHtmlPlugin", + "ModuleNotFoundPlugin", + "MiniCssExtractPlugin", + "ManifestPlugin", + "IgnorePlugin", + "ForkTsCheckerWebpackPlugin", + "ESLintWebpackPlugin", + "DocgenPlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev rename to lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows new file mode 100644 index 000000000000..25826d847fbc --- /dev/null +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows @@ -0,0 +1,224 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-kitchen-sink manager dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\jest\\\\register.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\storysource\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod rename to lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows new file mode 100644 index 000000000000..d68baf013ae7 --- /dev/null +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows @@ -0,0 +1,224 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-kitchen-sink manager production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\jest\\\\register.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\storysource\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev rename to lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows new file mode 100644 index 000000000000..e95420a4ed18 --- /dev/null +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows @@ -0,0 +1,468 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-kitchen-sink preview dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "NODE_MODULES\\\\webpack-hot-middleware\\\\client.js?reload=true&quiet=false&noInfo=undefined", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\html\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\html\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yRunner.js-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yHighlight.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\html-kitchen-sink\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "test": "/\\\\.html$/", + "use": "NODE_MODULES\\\\html-loader\\\\dist\\\\cjs.js", + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + "options": undefined, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": undefined, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "implementation": [Function], + }, + }, + ], + }, + Object { + "enforce": "pre", + "test": Array [ + "/\\\\.stories\\\\.(jsx?$|tsx?$)/", + ], + "use": Array [ + Object { + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": undefined, + }, + ], + }, + Object {}, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "WatchMissingNodeModulesPlugin", + "HotModuleReplacementPlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod rename to lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows new file mode 100644 index 000000000000..a335ea4911f8 --- /dev/null +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows @@ -0,0 +1,465 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`html-kitchen-sink preview production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\html\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\html\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yRunner.js-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yHighlight.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\html-kitchen-sink\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "test": "/\\\\.html$/", + "use": "NODE_MODULES\\\\html-loader\\\\dist\\\\cjs.js", + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + "options": undefined, + }, + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": undefined, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "implementation": [Function], + }, + }, + ], + }, + Object { + "enforce": "pre", + "test": Array [ + "/\\\\.stories\\\\.(jsx?$|tsx?$)/", + ], + "use": Array [ + Object { + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": undefined, + }, + ], + }, + Object {}, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/vue-3-cli_manager-dev rename to lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows new file mode 100644 index 000000000000..de281075348e --- /dev/null +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`vue-3-cli manager dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/vue-3-cli_manager-prod rename to lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows new file mode 100644 index 000000000000..f52cece42cae --- /dev/null +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`vue-3-cli manager production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/vue-3-cli_preview-dev rename to lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows new file mode 100644 index 000000000000..238143dae2cc --- /dev/null +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows @@ -0,0 +1,508 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`vue-3-cli preview dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "NODE_MODULES\\\\webpack-hot-middleware\\\\client.js?reload=true&quiet=false&noInfo=undefined", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\vue3\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\vue3\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\preset\\\\argsEnhancers.js-generated-config-entry.js", + "ROOT\\\\examples\\\\vue-3-cli\\\\.storybook\\\\preview.ts-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\vue-loader\\\\dist\\\\index.js", + "options": Object {}, + "test": "/\\\\.vue$/", + }, + Object { + "test": "/\\\\.tsx?$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\ts-loader\\\\index.js", + "options": Object { + "appendTsSuffixTo": Array [ + "/\\\\.vue$/", + ], + "transpileOnly": true, + }, + }, + ], + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "postcssOptions": Object { + "config": false, + "plugins": Array [ + [Function], + [Function], + ], + }, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + Object { + "enforce": "post", + "loader": "NODE_MODULES\\\\vue-docgen-loader\\\\lib\\\\index.js", + "options": Object { + "docgenOptions": Object { + "alias": Object { + "@emotion/core": "NODE_MODULES\\\\@emotion\\\\core", + "@emotion/styled": "NODE_MODULES\\\\@emotion\\\\styled", + "@storybook/addons": "ROOT\\\\lib\\\\addons", + "@storybook/api": "ROOT\\\\lib\\\\api", + "@storybook/channel-postmessage": "ROOT\\\\lib\\\\channel-postmessage", + "@storybook/channels": "ROOT\\\\lib\\\\channels", + "@storybook/client-api": "ROOT\\\\lib\\\\client-api", + "@storybook/client-logger": "ROOT\\\\lib\\\\client-logger", + "@storybook/components": "ROOT\\\\lib\\\\components", + "@storybook/core-events": "ROOT\\\\lib\\\\core-events", + "@storybook/preview-web": "ROOT\\\\lib\\\\preview-web", + "@storybook/router": "ROOT\\\\lib\\\\router", + "@storybook/semver": "NODE_MODULES\\\\@storybook\\\\semver", + "@storybook/store": "ROOT\\\\lib\\\\store", + "@storybook/theming": "ROOT\\\\lib\\\\theming", + "emotion-theming": "NODE_MODULES\\\\emotion-theming", + "react": "NODE_MODULES\\\\react", + "react-dom": "NODE_MODULES\\\\react-dom", + "vue$": "NODE_MODULES\\\\vue\\\\dist\\\\vue.esm-bundler.js", + }, + }, + }, + "test": "/\\\\.vue$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "WatchMissingNodeModulesPlugin", + "HotModuleReplacementPlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + "VueLoaderPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/vue-3-cli_preview-prod rename to lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows new file mode 100644 index 000000000000..b4f0e3a76e90 --- /dev/null +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows @@ -0,0 +1,505 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`vue-3-cli preview production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\vue3\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\vue3\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\measure\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\outline\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\preset\\\\argsEnhancers.js-generated-config-entry.js", + "ROOT\\\\examples\\\\vue-3-cli\\\\.storybook\\\\preview.ts-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\vue-loader\\\\dist\\\\index.js", + "options": Object {}, + "test": "/\\\\.vue$/", + }, + Object { + "test": "/\\\\.tsx?$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\ts-loader\\\\index.js", + "options": Object { + "appendTsSuffixTo": Array [ + "/\\\\.vue$/", + ], + "transpileOnly": true, + }, + }, + ], + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "postcssOptions": Object { + "config": false, + "plugins": Array [ + [Function], + [Function], + ], + }, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + Object { + "enforce": "post", + "loader": "NODE_MODULES\\\\vue-docgen-loader\\\\lib\\\\index.js", + "options": Object { + "docgenOptions": Object { + "alias": Object { + "@emotion/core": "NODE_MODULES\\\\@emotion\\\\core", + "@emotion/styled": "NODE_MODULES\\\\@emotion\\\\styled", + "@storybook/addons": "ROOT\\\\lib\\\\addons", + "@storybook/api": "ROOT\\\\lib\\\\api", + "@storybook/channel-postmessage": "ROOT\\\\lib\\\\channel-postmessage", + "@storybook/channels": "ROOT\\\\lib\\\\channels", + "@storybook/client-api": "ROOT\\\\lib\\\\client-api", + "@storybook/client-logger": "ROOT\\\\lib\\\\client-logger", + "@storybook/components": "ROOT\\\\lib\\\\components", + "@storybook/core-events": "ROOT\\\\lib\\\\core-events", + "@storybook/preview-web": "ROOT\\\\lib\\\\preview-web", + "@storybook/router": "ROOT\\\\lib\\\\router", + "@storybook/semver": "NODE_MODULES\\\\@storybook\\\\semver", + "@storybook/store": "ROOT\\\\lib\\\\store", + "@storybook/theming": "ROOT\\\\lib\\\\theming", + "emotion-theming": "NODE_MODULES\\\\emotion-theming", + "react": "NODE_MODULES\\\\react", + "react-dom": "NODE_MODULES\\\\react-dom", + "vue$": "NODE_MODULES\\\\vue\\\\dist\\\\vue.esm-bundler.js", + }, + }, + }, + "test": "/\\\\.vue$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + "VueLoaderPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev rename to lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows new file mode 100644 index 000000000000..4a1271b7caed --- /dev/null +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`web-components-kitchen-sink manager dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\storysource\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod rename to lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows new file mode 100644 index 000000000000..eff360f71e96 --- /dev/null +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`web-components-kitchen-sink manager production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\manager\\\\index.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\controls\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\storysource\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\viewport\\\\dist\\\\esm\\\\register.js", + "ROOT\\\\addons\\\\toolbars\\\\dist\\\\esm\\\\register.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "recordsPath", + "performance", + "optimization", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": Array [ + "NODE_MODULES/", + "/dist/", + ], + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-template-literals\\\\lib\\\\index.js", + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "CaseSensitivePathsPlugin", + "DefinePlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix similarity index 100% rename from lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev rename to lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows new file mode 100644 index 000000000000..ba269d9fb6a4 --- /dev/null +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows @@ -0,0 +1,505 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`web-components-kitchen-sink preview dev mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "NODE_MODULES\\\\webpack-hot-middleware\\\\client.js?reload=true&quiet=false&noInfo=undefined", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\web-components\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\web-components\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yRunner.js-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yHighlight.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\preset\\\\argsEnhancers.js-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\web-components-kitchen-sink\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "test": Array [ + "/src(.*)\\\\.js$/", + "/packages(\\\\/|\\\\\\\\)*(\\\\/|\\\\\\\\)src(\\\\/|\\\\\\\\)(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)lit-html(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)lit-element(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@open-wc(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@polymer(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@vaadin(.*)\\\\.js$/", + ], + "use": Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-import-meta\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-bundled-import-meta\\\\index.js", + Object { + "importStyle": "baseURI", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "corejs": 3, + "useBuiltIns": "entry", + }, + ], + ], + }, + }, + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "enforce": "pre", + "test": Array [ + "/\\\\.stories\\\\.(jsx?$|tsx?$)/", + ], + "use": Array [ + Object { + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": undefined, + }, + ], + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "postcssOptions": Object { + "config": false, + "plugins": Array [ + [Function], + [Function], + ], + }, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[path][name].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "WatchMissingNodeModulesPlugin", + "HotModuleReplacementPlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + ], +} +`; diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix similarity index 100% rename from lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod rename to lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows new file mode 100644 index 000000000000..c59f91beae8c --- /dev/null +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows @@ -0,0 +1,502 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`web-components-kitchen-sink preview production mode 1`] = ` +Object { + "entry": Array [ + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", + "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\globals.js", + "ROOT\\\\storybook-init-framework-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\common\\\\config.js-generated-config-entry.js", + "ROOT\\\\addons\\\\docs\\\\dist\\\\esm\\\\frameworks\\\\web-components\\\\config.js-generated-config-entry.js", + "ROOT\\\\app\\\\web-components\\\\dist\\\\esm\\\\client\\\\preview\\\\config-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yRunner.js-generated-config-entry.js", + "ROOT\\\\addons\\\\a11y\\\\dist\\\\esm\\\\a11yHighlight.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\actions\\\\dist\\\\esm\\\\preset\\\\addArgs.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\addons\\\\backgrounds\\\\dist\\\\esm\\\\preset\\\\addParameter.js-generated-config-entry.js", + "ROOT\\\\addons\\\\interactions\\\\dist\\\\esm\\\\preset\\\\argsEnhancers.js-generated-config-entry.js", + "ROOT\\\\addons\\\\links\\\\dist\\\\esm\\\\preset\\\\addDecorator.js-generated-config-entry.js", + "ROOT\\\\examples\\\\web-components-kitchen-sink\\\\.storybook\\\\preview.js-generated-config-entry.js", + "ROOT\\\\generated-stories-entry.js", + ], + "keys": Array [ + "name", + "mode", + "bail", + "devtool", + "entry", + "output", + "watchOptions", + "plugins", + "module", + "resolve", + "resolveLoader", + "optimization", + "performance", + ], + "module": Object { + "rules": Array [ + Object { + "exclude": "NODE_MODULES/", + "include": Array [ + "ROOT", + ], + "test": "/\\\\.(mjs|tsx?|jsx?)$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "include": [Function], + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "modules": false, + "shippedProposals": true, + "targets": "defaults", + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-react\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + ], + }, + Object { + "test": "/\\\\.md$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\raw-loader\\\\dist\\\\cjs.js", + }, + ], + }, + Object { + "test": Array [ + "/src(.*)\\\\.js$/", + "/packages(\\\\/|\\\\\\\\)*(\\\\/|\\\\\\\\)src(\\\\/|\\\\\\\\)(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)lit-html(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)lit-element(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@open-wc(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@polymer(.*)\\\\.js$/", + "NODE_MODULES(\\\\/|\\\\\\\\)@vaadin(.*)\\\\.js$/", + ], + "use": Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-import-meta\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-bundled-import-meta\\\\index.js", + Object { + "importStyle": "baseURI", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "corejs": 3, + "useBuiltIns": "entry", + }, + ], + ], + }, + }, + }, + Object { + "include": "NODE_MODULES\\\\\\\\acorn-jsx/", + "test": "/\\\\.js$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "modules": "commonjs", + }, + ], + ], + }, + }, + ], + }, + Object { + "test": "/(stories|story)\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "compilers": Array [ + [Function], + ], + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "exclude": "/(stories|story)\\\\.mdx$/", + "test": "/\\\\.mdx$/", + "use": Array [ + Object { + "loader": "NODE_MODULES\\\\babel-loader\\\\lib\\\\index.js", + "options": Object { + "babelrc": false, + "cacheDirectory": "NODE_MODULES\\\\.cache\\\\storybook\\\\babel", + "configFile": false, + "plugins": Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-shorthand-properties\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-block-scoping\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-decorators\\\\lib\\\\index.js", + Object { + "legacy": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-class-properties\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-private-methods\\\\lib\\\\index.js", + Object { + "loose": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-proposal-export-default-from\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-syntax-dynamic-import\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-proposal-object-rest-spread\\\\lib\\\\index.js", + Object { + "loose": true, + "useBuiltIns": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\plugin-transform-classes\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-arrow-functions\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-parameters\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-destructuring\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-spread\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-transform-for-of\\\\lib\\\\index.js", + "NODE_MODULES\\\\babel-plugin-macros\\\\dist\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-optional-chaining\\\\lib\\\\index.js", + "NODE_MODULES\\\\@babel\\\\plugin-proposal-nullish-coalescing-operator\\\\lib\\\\index.js", + Array [ + "NODE_MODULES\\\\babel-plugin-polyfill-corejs3\\\\lib\\\\index.js", + Object { + "absoluteImports": "NODE_MODULES\\\\core-js\\\\index.js", + "method": "usage-global", + "version": "*", + }, + ], + Array [ + "NODE_MODULES\\\\@babel\\\\plugin-transform-react-jsx\\\\lib\\\\index.js", + Object { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + }, + ], + ], + "presets": Array [ + Array [ + "NODE_MODULES\\\\@babel\\\\preset-env\\\\lib\\\\index.js", + Object { + "loose": true, + "shippedProposals": true, + }, + ], + "NODE_MODULES\\\\@babel\\\\preset-typescript\\\\lib\\\\index.js", + ], + "sourceType": "unambiguous", + }, + }, + Object { + "loader": "NODE_MODULES\\\\@mdx-js\\\\loader\\\\index.js", + "options": Object { + "remarkPlugins": Array [ + [Function], + [Function], + ], + }, + }, + ], + }, + Object { + "enforce": "pre", + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": Object { + "injectStoryParameters": true, + "inspectLocalDependencies": true, + }, + "test": "/\\\\.(stories|story)\\\\.[tj]sx?$/", + }, + Object { + "enforce": "pre", + "test": Array [ + "/\\\\.stories\\\\.(jsx?$|tsx?$)/", + ], + "use": Array [ + Object { + "loader": "ROOT\\\\lib\\\\source-loader\\\\dist\\\\cjs\\\\index.js", + "options": undefined, + }, + ], + }, + Object { + "sideEffects": true, + "test": "/\\\\.css$/", + "use": Array [ + "NODE_MODULES\\\\style-loader\\\\dist\\\\cjs.js", + Object { + "loader": "NODE_MODULES\\\\css-loader\\\\dist\\\\cjs.js", + "options": Object { + "importLoaders": 1, + }, + }, + Object { + "loader": "NODE_MODULES\\\\postcss-loader\\\\dist\\\\cjs.js", + "options": Object { + "postcssOptions": Object { + "config": false, + "plugins": Array [ + [Function], + [Function], + ], + }, + }, + }, + ], + }, + Object { + "loader": "NODE_MODULES\\\\file-loader\\\\dist\\\\cjs.js", + "options": Object { + "esModule": false, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\\\\?.*)?$/", + }, + Object { + "loader": "NODE_MODULES\\\\url-loader\\\\dist\\\\cjs.js", + "options": Object { + "limit": 10000, + "name": "static/media/[name].[contenthash:8].[ext]", + }, + "test": "/\\\\.(mp4|webm|wav|mp3|m4a|aac|oga)(\\\\?.*)?$/", + }, + ], + }, + "plugins": Array [ + "FilterWarningsPlugin", + "VirtualModulesPlugin", + "HtmlWebpackPlugin", + "DefinePlugin", + "CaseSensitivePathsPlugin", + "ProgressPlugin", + ], +} +`; diff --git a/lib/core-server/src/core-presets.test.ts b/lib/core-server/src/core-presets.test.ts index a3c194a1dbc8..8e252c32dd54 100644 --- a/lib/core-server/src/core-presets.test.ts +++ b/lib/core-server/src/core-presets.test.ts @@ -19,6 +19,8 @@ import htmlOptions from '../../../app/html/src/server/options'; import webComponentsOptions from '../../../app/web-components/src/server/options'; import { outputStats } from './utils/output-stats'; +const { SNAPSHOT_OS } = global; + // this only applies to this file jest.setTimeout(10000); @@ -151,13 +153,13 @@ describe.each([ await buildDevStandalone({ ...options, ignorePreview: true }); const managerConfig = prepareSnap(managerExecutor.get, 'manager'); - expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-dev`)); + expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-dev-${SNAPSHOT_OS}`)); }); it('production mode', async () => { await buildStaticStandalone({ ...options, ignorePreview: true }); const managerConfig = prepareSnap(managerExecutor.get, 'manager'); - expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-prod`)); + expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-prod-${SNAPSHOT_OS}`)); }); }); @@ -166,13 +168,13 @@ describe.each([ await buildDevStandalone({ ...options, managerCache: true }); const previewConfig = prepareSnap(previewExecutor.get, 'preview'); - expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-dev`)); + expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-dev-${SNAPSHOT_OS}`)); }); it('production mode', async () => { await buildStaticStandalone({ ...options, managerCache: true }); const previewConfig = prepareSnap(previewExecutor.get, 'preview'); - expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-prod`)); + expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-prod-${SNAPSHOT_OS}`)); }); }); }); diff --git a/lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.injectStoryParameters-posix.snapshot b/lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.injectStoryParameters-posix.snapshot new file mode 100644 index 000000000000..5b50732e7967 --- /dev/null +++ b/lib/source-loader/src/abstract-syntax-tree/__snapshots__/inject-decorator.csf.test.js.injectStoryParameters-posix.snapshot @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`inject-decorator injectStoryParameters - ts - csf includes storySource parameter in the default exported object 1`] = ` +" + + +Basic.parameters = { storySource: { source: \\"() => (\\\\n \\\\n)\\" }, ...Basic.parameters }; +WithParams.parameters = { storySource: { source: \\"() => \\" }, ...WithParams.parameters }; +WithDocsParams.parameters = { storySource: { source: \\"() => \\" }, ...WithDocsParams.parameters }; +WithStorySourceParams.parameters = { storySource: { source: \\"() => \\" }, ...WithStorySourceParams.parameters }; +WithTemplate.parameters = { storySource: { source: \\"(args: Args) => \\\\r\\\\n)\\" }, ...Basic.parameters }; +WithParams.parameters = { storySource: { source: \\"() => \\" }, ...WithParams.parameters }; +WithDocsParams.parameters = { storySource: { source: \\"() => \\" }, ...WithDocsParams.parameters }; +WithStorySourceParams.parameters = { storySource: { source: \\"() => \\" }, ...WithStorySourceParams.parameters }; +WithTemplate.parameters = { storySource: { source: \\"(args: Args) => \\\\n)\\" }, ...Basic.parameters }; -WithParams.parameters = { storySource: { source: \\"() => \\" }, ...WithParams.parameters }; -WithDocsParams.parameters = { storySource: { source: \\"() => \\" }, ...WithDocsParams.parameters }; -WithStorySourceParams.parameters = { storySource: { source: \\"() => \\" }, ...WithStorySourceParams.parameters }; -WithTemplate.parameters = { storySource: { source: \\"(args: Args) => \\\\r\\\\n);\\\\r\\\\n\\\\r\\\\nexport const emoji = () => (\\\\r\\\\n \\\\r\\\\n);\\\\r\\\\n\\\\r\\\\nexport function emojiFn() {\\\\r\\\\n return (\\\\r\\\\n \\\\r\\\\n )\\\\r\\\\n};\\\\r\\\\n\\",\\"locationsMap\\":{\\"text\\":{\\"startLoc\\":{\\"col\\":20,\\"line\\":11},\\"endLoc\\":{\\"col\\":1,\\"line\\":13},\\"startBody\\":{\\"col\\":20,\\"line\\":11},\\"endBody\\":{\\"col\\":1,\\"line\\":13}},\\"emoji\\":{\\"startLoc\\":{\\"col\\":21,\\"line\\":15},\\"endLoc\\":{\\"col\\":1,\\"line\\":21},\\"startBody\\":{\\"col\\":21,\\"line\\":15},\\"endBody\\":{\\"col\\":1,\\"line\\":21}},\\"emoji-fn\\":{\\"startLoc\\":{\\"col\\":7,\\"line\\":23},\\"endLoc\\":{\\"col\\":1,\\"line\\":31},\\"startBody\\":{\\"col\\":7,\\"line\\":23},\\"endBody\\":{\\"col\\":1,\\"line\\":31}}}},}, + title: \\"Button\\", + excludeStories: [\\"text\\"], + includeStories: /emoji.*/ +}; + +export const text = () => ( + +); + +export const emoji = () => ( + +);; + +export const emojiFn = function emojiFn() { + return ( + + ) +}; +" +`; diff --git a/lib/source-loader/src/abstract-syntax-tree/inject-decorator.csf.test.js b/lib/source-loader/src/abstract-syntax-tree/inject-decorator.csf.test.js index c26acb5cb834..4a9c9bc8137c 100644 --- a/lib/source-loader/src/abstract-syntax-tree/inject-decorator.csf.test.js +++ b/lib/source-loader/src/abstract-syntax-tree/inject-decorator.csf.test.js @@ -1,8 +1,13 @@ import fs from 'fs'; import path from 'path'; +import 'jest-specific-snapshot'; import injectDecorator from './inject-decorator'; +const { SNAPSHOT_OS } = global; + describe('inject-decorator', () => { + const snapshotDir = path.join(__dirname, '__snapshots__'); + describe('positive - ts - csf', () => { it('includes storySource parameter in the default exported object', () => { const mockFilePath = './__mocks__/inject-decorator.ts.csf.txt'; @@ -11,7 +16,9 @@ describe('inject-decorator', () => { parser: 'typescript', }); - expect(result.source).toMatchSnapshot(); + expect(result.source).toMatchSpecificSnapshot( + path.join(snapshotDir, `inject-decorator.csf.test.js.${SNAPSHOT_OS}.snapshot`) + ); expect(result.source).toEqual( expect.stringContaining( 'export default {parameters: {"storySource":{"source":"import React from' @@ -28,8 +35,12 @@ describe('inject-decorator', () => { injectStoryParameters: true, parser: 'typescript', }); - - expect(result.source).toMatchSnapshot(); + expect(result.source).toMatchSpecificSnapshot( + path.join( + snapshotDir, + `inject-decorator.csf.test.js.injectStoryParameters-${SNAPSHOT_OS}.snapshot` + ) + ); }); }); }); From 3d64cda527de9c69614b4792012529e7498a3a1f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 23 Nov 2021 17:30:12 -0800 Subject: [PATCH 03/14] [wip] Fix unit tests on windows --- .eslintrc.js | 4 ++++ .../storyshots-core/src/frameworks/configure.test.ts | 9 +++++---- app/react/src/server/cra-config.test.ts | 9 +++++---- .../src/utils/__tests__/server-statics.test.ts | 11 ++++++++--- package.json | 1 + yarn.lock | 8 ++++++++ 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3dc077d3aad4..b38e16c9be69 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,10 @@ module.exports = { extends: ['@storybook/eslint-config-storybook', 'plugin:storybook/recommended'], rules: { '@typescript-eslint/ban-ts-comment': 'warn', + 'jest/no-standalone-expect': [ + 'error', + { additionalTestBlockFunctions: ['it.skipWindows', 'it.onWindows'] }, + ], }, overrides: [ { diff --git a/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts b/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts index 76c88463876a..509aa5a13b24 100644 --- a/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts +++ b/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts @@ -1,3 +1,4 @@ +import path from 'path'; import { getPreviewFile, getMainFile } from './configure'; // eslint-disable-next-line global-require, jest/no-mocks-import @@ -19,9 +20,9 @@ describe('preview files', () => { ${'config.js'} ${'config.jsx'} `('resolves a valid preview file from $filepath', ({ filepath }) => { - setupFiles({ [`test/${filepath}`]: 'true' }); + setupFiles({ [path.join('test', filepath)]: 'true' }); - expect(getPreviewFile('test/')).toEqual(`test/${filepath}`); + expect(getPreviewFile('test/')).toEqual(`test${path.sep}${filepath}`); }); it('returns false when none of the paths exist', () => { @@ -39,9 +40,9 @@ describe('main files', () => { ${'main.js'} ${'main.jsx'} `('resolves a valid main file path from $filepath', ({ filepath }) => { - setupFiles({ [`test/${filepath}`]: 'true' }); + setupFiles({ [path.join('test', filepath)]: 'true' }); - expect(getMainFile('test/')).toEqual(`test/${filepath}`); + expect(getMainFile('test/')).toEqual(`test${path.sep}${filepath}`); }); it('returns false when none of the paths exist', () => { diff --git a/app/react/src/server/cra-config.test.ts b/app/react/src/server/cra-config.test.ts index c6b1a57c30ea..3f5c8c9d361a 100644 --- a/app/react/src/server/cra-config.test.ts +++ b/app/react/src/server/cra-config.test.ts @@ -1,4 +1,5 @@ import fs from 'fs'; +import path from 'path'; import { getReactScriptsPath } from './cra-config'; jest.mock('fs', () => ({ @@ -7,7 +8,7 @@ jest.mock('fs', () => ({ existsSync: jest.fn(() => true), })); -const SCRIPT_PATH = '.bin/react-scripts'; +const SCRIPT_PATH = path.join('.bin', 'react-scripts'); describe('cra-config', () => { describe('when used with the default react-scripts package', () => { @@ -19,7 +20,7 @@ describe('cra-config', () => { it('should locate the react-scripts package', () => { expect(getReactScriptsPath({ noCache: true })).toEqual( - '/test-project/node_modules/react-scripts' + path.join(path.sep, 'test-project', 'node_modules', 'react-scripts') ); }); }); @@ -33,7 +34,7 @@ describe('cra-config', () => { it('should locate the react-scripts package', () => { expect(getReactScriptsPath({ noCache: true })).toEqual( - '/test-project/node_modules/custom-react-scripts' + path.join(path.sep, 'test-project', 'node_modules', 'custom-react-scripts') ); }); }); @@ -65,7 +66,7 @@ exit $ret` it('should locate the react-scripts package', () => { expect(getReactScriptsPath({ noCache: true })).toEqual( - '/test-project/node_modules/custom-react-scripts' + path.join(path.sep, 'test-project', 'node_modules', 'custom-react-scripts') ); }); }); diff --git a/lib/core-server/src/utils/__tests__/server-statics.test.ts b/lib/core-server/src/utils/__tests__/server-statics.test.ts index 411511ce0b05..789d0d2b1940 100644 --- a/lib/core-server/src/utils/__tests__/server-statics.test.ts +++ b/lib/core-server/src/utils/__tests__/server-statics.test.ts @@ -1,5 +1,6 @@ import fs from 'fs-extra'; import path from 'path'; +import 'jest-os-detection'; import { parseStaticDir } from '../server-statics'; fs.pathExists = jest.fn().mockReturnValue(true); @@ -37,30 +38,34 @@ describe('parseStaticDir', () => { }); }); - it('supports absolute file paths', async () => { + it.skipWindows('supports absolute file paths - posix', async () => { await expect(parseStaticDir('/foo/bar')).resolves.toEqual({ staticDir: '/foo/bar', staticPath: '/foo/bar', targetDir: './', targetEndpoint: '/', }); + }); + it.onWindows('supports absolute file paths - windows', async () => { await expect(parseStaticDir('C:\\foo\\bar')).resolves.toEqual({ - staticDir: expect.any(String), // can't test this properly on unix + staticDir: path.resolve('C:\\foo\\bar'), staticPath: path.resolve('C:\\foo\\bar'), targetDir: './', targetEndpoint: '/', }); }); - it('supports absolute file paths with custom endpoint', async () => { + it.skipWindows('supports absolute file paths with custom endpoint - posix', async () => { await expect(parseStaticDir('/foo/bar:/custom-endpoint')).resolves.toEqual({ staticDir: '/foo/bar', staticPath: '/foo/bar', targetDir: './custom-endpoint', targetEndpoint: '/custom-endpoint', }); + }); + it.onWindows('supports absolute file paths with custom endpoint - windows', async () => { await expect(parseStaticDir('C:\\foo\\bar:/custom-endpoint')).resolves.toEqual({ staticDir: expect.any(String), // can't test this properly on unix staticPath: path.resolve('C:\\foo\\bar'), diff --git a/package.json b/package.json index b402c794d9b1..38fcc58ca43e 100644 --- a/package.json +++ b/package.json @@ -244,6 +244,7 @@ "jest-enzyme": "^7.1.2", "jest-image-snapshot": "^4.3.0", "jest-jasmine2": "^26.6.3", + "jest-os-detection": "^1.3.1", "jest-raw-loader": "^1.0.1", "jest-serializer-html": "^7.0.0", "jest-teamcity": "^1.9.0", diff --git a/yarn.lock b/yarn.lock index 4d8f874d0c4a..c6844e8e3599 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9827,6 +9827,7 @@ __metadata: jest-enzyme: ^7.1.2 jest-image-snapshot: ^4.3.0 jest-jasmine2: ^26.6.3 + jest-os-detection: ^1.3.1 jest-raw-loader: ^1.0.1 jest-serializer-html: ^7.0.0 jest-teamcity: ^1.9.0 @@ -29773,6 +29774,13 @@ fsevents@^1.2.7: languageName: node linkType: hard +"jest-os-detection@npm:^1.3.1": + version: 1.3.1 + resolution: "jest-os-detection@npm:1.3.1" + checksum: 0fd540b9518d443fe037bd74c3413869e23b167faa3c3f2653c652eb9b0f4acf5448df92344bdf67f4d0d6e994294513e3ba6b0507c245e5d9d31e83541ac621 + languageName: node + linkType: hard + "jest-pnp-resolver@npm:^1.2.1, jest-pnp-resolver@npm:^1.2.2": version: 1.2.2 resolution: "jest-pnp-resolver@npm:1.2.2" From 79cc0abf5831971e8ce3363b336c99e1a9c028a9 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 24 Nov 2021 00:57:03 -0500 Subject: [PATCH 04/14] Avoid concurrent test failures --- .../cra-ts-essentials_manager-dev-posix | 2 +- .../cra-ts-essentials_manager-dev-windows | 2 +- .../cra-ts-essentials_manager-prod-posix | 2 +- .../cra-ts-essentials_manager-prod-windows | 2 +- .../cra-ts-essentials_preview-dev-posix | 2 +- .../cra-ts-essentials_preview-dev-windows | 2 +- .../cra-ts-essentials_preview-prod-posix | 2 +- .../cra-ts-essentials_preview-prod-windows | 2 +- .../html-kitchen-sink_manager-dev-posix | 2 +- .../html-kitchen-sink_manager-dev-windows | 2 +- .../html-kitchen-sink_manager-prod-posix | 2 +- .../html-kitchen-sink_manager-prod-windows | 2 +- .../html-kitchen-sink_preview-dev-posix | 2 +- .../html-kitchen-sink_preview-dev-windows | 2 +- .../html-kitchen-sink_preview-prod-posix | 2 +- .../html-kitchen-sink_preview-prod-windows | 2 +- .../__snapshots__/vue-3-cli_manager-dev-posix | 2 +- .../vue-3-cli_manager-dev-windows | 2 +- .../vue-3-cli_manager-prod-posix | 2 +- .../vue-3-cli_manager-prod-windows | 2 +- .../__snapshots__/vue-3-cli_preview-dev-posix | 2 +- .../vue-3-cli_preview-dev-windows | 2 +- .../vue-3-cli_preview-prod-posix | 2 +- .../vue-3-cli_preview-prod-windows | 2 +- ...-components-kitchen-sink_manager-dev-posix | 2 +- ...omponents-kitchen-sink_manager-dev-windows | 2 +- ...components-kitchen-sink_manager-prod-posix | 2 +- ...mponents-kitchen-sink_manager-prod-windows | 2 +- ...-components-kitchen-sink_preview-dev-posix | 2 +- ...omponents-kitchen-sink_preview-dev-windows | 2 +- ...components-kitchen-sink_preview-prod-posix | 2 +- ...mponents-kitchen-sink_preview-prod-windows | 2 +- lib/core-server/src/core-presets.test.ts | 83 +++++++++---------- 33 files changed, 73 insertions(+), 74 deletions(-) diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix index c40a4b86973a..3cb4e969ec7c 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials manager dev mode 1`] = ` +exports[`cra-ts-essentials manager dev 1`] = ` Object { "entry": Array [ "NODE_MODULES/@storybook/addon-ie11/dist/event-source-polyfill.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows index 86a38bc04d08..a4d6ab1b2ec2 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials manager dev mode 1`] = ` +exports[`cra-ts-essentials manager dev 1`] = ` Object { "entry": Array [ "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix index 0f9cc7677236..be3a20226f53 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials manager production mode 1`] = ` +exports[`cra-ts-essentials manager prod 1`] = ` Object { "entry": Array [ "NODE_MODULES/@storybook/addon-ie11/dist/event-source-polyfill.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows index ecdf3b1d7beb..56235c961e94 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_manager-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials manager production mode 1`] = ` +exports[`cra-ts-essentials manager prod 1`] = ` Object { "entry": Array [ "NODE_MODULES\\\\@storybook\\\\addon-ie11\\\\dist\\\\event-source-polyfill.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix index a9ba6e4f187f..d7f46dd2aa31 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials preview dev mode 1`] = ` +exports[`cra-ts-essentials preview dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows index 764ac349ad57..1cc4bd0385e1 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials preview dev mode 1`] = ` +exports[`cra-ts-essentials preview dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix index f0b51e148bc0..1b7e29e75458 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials preview production mode 1`] = ` +exports[`cra-ts-essentials preview prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows index 3ac95e0165b1..8ba46344f97b 100644 --- a/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows +++ b/lib/core-server/src/__snapshots__/cra-ts-essentials_preview-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`cra-ts-essentials preview production mode 1`] = ` +exports[`cra-ts-essentials preview prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix index cf3ca00168f2..6c3b6c6905a1 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink manager dev mode 1`] = ` +exports[`html-kitchen-sink manager dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows index 25826d847fbc..720068654b97 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink manager dev mode 1`] = ` +exports[`html-kitchen-sink manager dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix index 4a70bd2050b3..23cbfd62d77b 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink manager production mode 1`] = ` +exports[`html-kitchen-sink manager prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows index d68baf013ae7..1e6c51829294 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_manager-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink manager production mode 1`] = ` +exports[`html-kitchen-sink manager prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix index beb3902b3269..a82d81685ea5 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink preview dev mode 1`] = ` +exports[`html-kitchen-sink preview dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows index e95420a4ed18..7a82aa29063e 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink preview dev mode 1`] = ` +exports[`html-kitchen-sink preview dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix index 8e448953b9e4..386a7ca152ba 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink preview production mode 1`] = ` +exports[`html-kitchen-sink preview prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows index a335ea4911f8..8cada2ea85a5 100644 --- a/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows +++ b/lib/core-server/src/__snapshots__/html-kitchen-sink_preview-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`html-kitchen-sink preview production mode 1`] = ` +exports[`html-kitchen-sink preview prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix index 98a23108f22b..ffcf1511c02f 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli manager dev mode 1`] = ` +exports[`vue-3-cli manager dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows index de281075348e..f581e5743e10 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli manager dev mode 1`] = ` +exports[`vue-3-cli manager dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix index 852c93c75b1e..95af9590e84e 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli manager production mode 1`] = ` +exports[`vue-3-cli manager prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows index f52cece42cae..987ef3040657 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows +++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli manager production mode 1`] = ` +exports[`vue-3-cli manager prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix index 4c50f9a41f84..019ce00d84fa 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli preview dev mode 1`] = ` +exports[`vue-3-cli preview dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows index 238143dae2cc..a9553da08453 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli preview dev mode 1`] = ` +exports[`vue-3-cli preview dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix index c6568ccbc457..e8876e745eeb 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli preview production mode 1`] = ` +exports[`vue-3-cli preview prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows index b4f0e3a76e90..7dccbcf7871c 100644 --- a/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows +++ b/lib/core-server/src/__snapshots__/vue-3-cli_preview-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`vue-3-cli preview production mode 1`] = ` +exports[`vue-3-cli preview prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix index 87e89ac2a502..ac378611271d 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink manager dev mode 1`] = ` +exports[`web-components-kitchen-sink manager dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows index 4a1271b7caed..92a0254ed525 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink manager dev mode 1`] = ` +exports[`web-components-kitchen-sink manager dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix index f451a115f123..3b75b563d198 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink manager production mode 1`] = ` +exports[`web-components-kitchen-sink manager prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows index eff360f71e96..eef86574c99c 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_manager-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink manager production mode 1`] = ` +exports[`web-components-kitchen-sink manager prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix index 9c88ae239e7d..847c8d79268e 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink preview dev mode 1`] = ` +exports[`web-components-kitchen-sink preview dev 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows index ba269d9fb6a4..ed7860aa94c8 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-dev-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink preview dev mode 1`] = ` +exports[`web-components-kitchen-sink preview dev 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix index 6feed165dd35..5b6c1610983f 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-posix @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink preview production mode 1`] = ` +exports[`web-components-kitchen-sink preview prod 1`] = ` Object { "entry": Array [ "ROOT/lib/core-client/dist/esm/globals/polyfills.js", diff --git a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows index c59f91beae8c..71f4a2a1147a 100644 --- a/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows +++ b/lib/core-server/src/__snapshots__/web-components-kitchen-sink_preview-prod-windows @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`web-components-kitchen-sink preview production mode 1`] = ` +exports[`web-components-kitchen-sink preview prod 1`] = ` Object { "entry": Array [ "ROOT\\\\lib\\\\core-client\\\\dist\\\\esm\\\\globals\\\\polyfills.js", diff --git a/lib/core-server/src/core-presets.test.ts b/lib/core-server/src/core-presets.test.ts index 8e252c32dd54..87108b787e4b 100644 --- a/lib/core-server/src/core-presets.test.ts +++ b/lib/core-server/src/core-presets.test.ts @@ -1,5 +1,8 @@ import 'jest-specific-snapshot'; import path from 'path'; +import { mkdtemp as mkdtempCb } from 'fs'; +import os from 'os'; +import { promisify } from 'util'; import { Configuration } from 'webpack'; import Cache from 'file-system-cache'; import { resolvePathInStorybookCache } from '@storybook/core-common'; @@ -20,10 +23,12 @@ import webComponentsOptions from '../../../app/web-components/src/server/options import { outputStats } from './utils/output-stats'; const { SNAPSHOT_OS } = global; +const mkdtemp = promisify(mkdtempCb); // this only applies to this file jest.setTimeout(10000); +// FIXME: this doesn't work const skipStoriesJsonPreset = [{ features: { buildStoriesJson: false, storyStoreV7: false } }]; jest.mock('@storybook/builder-webpack4', () => { @@ -87,7 +92,6 @@ const baseOptions = { docsMode: false, cache, configDir: path.resolve(`${__dirname}/../../../examples/react-ts/.storybook`), - outputDir: `${__dirname}/storybook-static`, // production ci: true, managerCache: false, }; @@ -137,44 +141,35 @@ describe.each([ ['web-components-kitchen-sink', webComponentsOptions], ['html-kitchen-sink', htmlOptions], ])('%s', (example, frameworkOptions) => { - beforeEach(() => { - jest.clearAllMocks(); - cache.clear(); - }); - - const options = { - ...baseOptions, - ...frameworkOptions, - configDir: path.resolve(`${__dirname}/../../../examples/${example}/.storybook`), - }; - - describe('manager', () => { - it('dev mode', async () => { - await buildDevStandalone({ ...options, ignorePreview: true }); - - const managerConfig = prepareSnap(managerExecutor.get, 'manager'); - expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-dev-${SNAPSHOT_OS}`)); - }); - it('production mode', async () => { - await buildStaticStandalone({ ...options, ignorePreview: true }); - - const managerConfig = prepareSnap(managerExecutor.get, 'manager'); - expect(managerConfig).toMatchSpecificSnapshot(snap(`${example}_manager-prod-${SNAPSHOT_OS}`)); - }); - }); - - describe('preview', () => { - it('dev mode', async () => { - await buildDevStandalone({ ...options, managerCache: true }); - - const previewConfig = prepareSnap(previewExecutor.get, 'preview'); - expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-dev-${SNAPSHOT_OS}`)); + describe.each([ + ['manager', managerExecutor], + ['preview', previewExecutor], + ])('%s', (component, executor) => { + beforeEach(async () => { + jest.clearAllMocks(); + await cache.clear(); }); - it('production mode', async () => { - await buildStaticStandalone({ ...options, managerCache: true }); - const previewConfig = prepareSnap(previewExecutor.get, 'preview'); - expect(previewConfig).toMatchSpecificSnapshot(snap(`${example}_preview-prod-${SNAPSHOT_OS}`)); + it.each([ + ['prod', buildStaticStandalone], + ['dev', buildDevStandalone], + ])('%s', async (mode, builder) => { + const options = { + ...baseOptions, + ...frameworkOptions, + configDir: path.resolve(`${__dirname}/../../../examples/${example}/.storybook`), + // Only add an outputDir in production mode. + outputDir: + mode === 'prod' ? await mkdtemp(path.join(os.tmpdir(), 'storybook-static-')) : undefined, + ignorePreview: component === 'manager', + managerCache: component === 'preview', + }; + + await builder(options); + const config = prepareSnap(executor.get, component); + expect(config).toMatchSpecificSnapshot( + snap(`${example}_${component}-${mode}-${SNAPSHOT_OS}`) + ); }); }); }); @@ -183,9 +178,9 @@ const progressPlugin = (config) => config.plugins.find((p) => p.constructor.name === 'ProgressPlugin'); describe('dev cli flags', () => { - beforeEach(() => { + beforeEach(async () => { jest.clearAllMocks(); - cache.clear(); + await cache.clear(); }); const cliOptions = { ...reactOptions, ...baseOptions }; @@ -250,11 +245,15 @@ describe('dev cli flags', () => { }); describe('build cli flags', () => { - beforeEach(() => { + beforeEach(async () => { jest.clearAllMocks(); - cache.clear(); + await cache.clear(); }); - const cliOptions = { ...reactOptions, ...baseOptions }; + const cliOptions = { + ...reactOptions, + ...baseOptions, + outputDir: `${__dirname}/storybook-static`, + }; it('--webpack-stats-json calls output-stats', async () => { await buildStaticStandalone(cliOptions); From 595ce8a45064ed5d85344923d8c2bcb038c42598 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sat, 4 Dec 2021 18:29:24 -0500 Subject: [PATCH 05/14] Fix angular cli windows tests --- .../framework-preset-angular-cli.test.ts | 88 +++++++++++-------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/app/angular/src/server/framework-preset-angular-cli.test.ts b/app/angular/src/server/framework-preset-angular-cli.test.ts index 09a6e9b6a514..967d85a52099 100644 --- a/app/angular/src/server/framework-preset-angular-cli.test.ts +++ b/app/angular/src/server/framework-preset-angular-cli.test.ts @@ -1,6 +1,8 @@ /* eslint-disable jest/no-interpolation-in-snapshots */ +import path from 'path'; import { Configuration } from 'webpack'; import { logger } from '@storybook/node-logger'; +import { normalize, getSystemPath } from '@angular-devkit/core'; import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; import { webpackFinal } from './framework-preset-angular-cli'; import { PresetOptions } from './options'; @@ -21,7 +23,7 @@ afterEach(() => { }); function initMockWorkspace(name: string) { - workspaceRoot = `${testPath}/__mocks-ng-workspace__/${name}`; + workspaceRoot = path.join(__dirname, '__mocks-ng-workspace__', name); cwdSpy.mockReturnValue(workspaceRoot); } @@ -263,7 +265,7 @@ describe('framework-preset-angular-cli', () => { expect(webpackFinalConfig.resolve.modules).toEqual([ ...baseWebpackConfig.resolve.modules, - `${workspaceRoot}/src`, + getSystemPath(normalize(path.join(workspaceRoot, 'src'))).replace(/\\/g, '/'), ]); }); @@ -274,7 +276,9 @@ describe('framework-preset-angular-cli', () => { expect(webpackFinalConfig.resolve.plugins).toMatchInlineSnapshot(` Array [ TsconfigPathsPlugin { - "absoluteBaseUrl": "${workspaceRoot}/src/", + "absoluteBaseUrl": "${( + getSystemPath(normalize(path.join(workspaceRoot, 'src'))) + path.sep + ).replace(/\\/g, '\\\\')}", "baseUrl": "./", "extensions": Array [ ".ts", @@ -307,8 +311,8 @@ describe('framework-preset-angular-cli', () => { ...baseWebpackConfig, entry: [ ...(baseWebpackConfig.entry as any[]), - `${workspaceRoot}/src/styles.css`, - `${workspaceRoot}/src/styles.scss`, + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), ], module: { ...baseWebpackConfig.module, rules: expect.anything() }, plugins: expect.anything(), @@ -325,45 +329,48 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - + const stylePaths = [ + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), + ]; expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.css$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.less$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.styl$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.css$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.less$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.styl$/, use: expect.anything(), }, @@ -398,8 +405,8 @@ describe('framework-preset-angular-cli', () => { ...baseWebpackConfig, entry: [ ...(baseWebpackConfig.entry as any[]), - `${workspaceRoot}/src/styles.css`, - `${workspaceRoot}/src/styles.scss`, + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), ], module: { ...baseWebpackConfig.module, rules: expect.anything() }, plugins: expect.anything(), @@ -416,45 +423,49 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); + const stylePaths = [ + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), + ]; expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.css$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.less$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.styl$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.css$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.less$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.styl$/, use: expect.anything(), }, @@ -476,8 +487,8 @@ describe('framework-preset-angular-cli', () => { ...baseWebpackConfig, entry: [ ...(baseWebpackConfig.entry as any[]), - `${workspaceRoot}/src/styles.css`, - `${workspaceRoot}/src/styles.scss`, + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), ], module: { ...baseWebpackConfig.module, rules: expect.anything() }, plugins: expect.anything(), @@ -498,45 +509,49 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); + const stylePaths = [ + path.join(workspaceRoot, 'src', 'styles.css'), + path.join(workspaceRoot, 'src', 'styles.scss'), + ]; expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.css$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.less$/, use: expect.anything(), }, { - exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + exclude: stylePaths, test: /\.styl$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.css$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.scss$|\.sass$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.less$/, use: expect.anything(), }, { - include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + include: stylePaths, test: /\.styl$/, use: expect.anything(), }, @@ -699,7 +714,10 @@ describe('framework-preset-angular-cli', () => { expect(webpackFinalConfig).toEqual({ ...baseWebpackConfig, - entry: [...(baseWebpackConfig.entry as any[]), `${workspaceRoot}/src/styles.css`], + entry: [ + ...(baseWebpackConfig.entry as any[]), + path.join(workspaceRoot, 'src', 'styles.css'), + ], module: { ...baseWebpackConfig.module, rules: expect.anything() }, plugins: expect.anything(), resolve: { From e65bd0ecb7cb420d7d0f19ac47f81ad2e88ed91c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sat, 4 Dec 2021 19:09:13 -0800 Subject: [PATCH 06/14] Fix windows tests for normalizeStoryPath --- .../src/utils/__tests__/paths.test.ts | 41 ++++--------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/lib/core-common/src/utils/__tests__/paths.test.ts b/lib/core-common/src/utils/__tests__/paths.test.ts index b1422aee080f..bbb1e7147109 100644 --- a/lib/core-common/src/utils/__tests__/paths.test.ts +++ b/lib/core-common/src/utils/__tests__/paths.test.ts @@ -3,54 +3,27 @@ import { normalizeStoryPath } from '../paths'; describe('paths - normalizeStoryPath()', () => { it('returns a path starting with "./" unchanged', () => { - const filename = `./src/Comp.story.js`; + const filename = `.${path.sep}${path.join('src', 'Comp.story.js')}`; expect(normalizeStoryPath(filename)).toEqual(filename); }); it('returns a path starting with "../" unchanged', () => { - const filename = `../src/Comp.story.js`; + const filename = path.join('..', 'src', 'Comp.story.js'); expect(normalizeStoryPath(filename)).toEqual(filename); }); it('adds "./" to a normalized relative path', () => { - const filename = `src/Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`./${filename}`); + const filename = path.join('src', 'Comp.story.js'); + expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); }); it('adds "./" to a hidden folder', () => { - const filename = `.storybook/Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`./${filename}`); + const filename = path.join('.storybook', 'Comp.story.js'); + expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); }); it('adds "./" to a hidden file', () => { const filename = `.Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`./${filename}`); - }); - - describe('windows paths', () => { - it('returns a path starting with ".\\" unchanged', () => { - const filename = `.\\src\\Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(filename); - }); - - it('returns a path starting with "..\\" unchanged', () => { - const filename = `..\\src\\Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(filename); - }); - - it('adds ".{path.sep}" to a normalized relative path', () => { - const filename = `src\\Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); - }); - - it('adds ".{path.sep}" to a hidden folder', () => { - const filename = `.storybook\\Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); - }); - - it('adds ".{path.sep}" to a hidden file', () => { - const filename = `.Comp.story.js`; - expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); - }); + expect(normalizeStoryPath(filename)).toEqual(`.${path.sep}${filename}`); }); }); From 24a2535d53a37e6f6934ac3e0c3448abe5696a97 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 07:54:55 -0800 Subject: [PATCH 07/14] Fix windows tests failing from main.js mock --- lib/cli/src/automigrate/fixes/angular12.test.ts | 3 ++- lib/cli/src/automigrate/fixes/cra5.test.ts | 3 ++- lib/cli/src/automigrate/fixes/eslint-plugin.test.ts | 5 ++++- lib/cli/src/automigrate/fixes/webpack5.test.ts | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/cli/src/automigrate/fixes/angular12.test.ts b/lib/cli/src/automigrate/fixes/angular12.test.ts index 6a9626674934..c00b45184056 100644 --- a/lib/cli/src/automigrate/fixes/angular12.test.ts +++ b/lib/cli/src/automigrate/fixes/angular12.test.ts @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +import path from 'path'; import { JsPackageManager } from '../../js-package-manager'; import { angular12 } from './angular12'; @@ -8,7 +9,7 @@ jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); const checkCra5 = async ({ packageJson, main }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ - '.storybook/main.js': `module.exports = ${JSON.stringify(main)};`, + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, }); const packageManager = { retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), diff --git a/lib/cli/src/automigrate/fixes/cra5.test.ts b/lib/cli/src/automigrate/fixes/cra5.test.ts index 15717948ff6a..72e42f9f6f65 100644 --- a/lib/cli/src/automigrate/fixes/cra5.test.ts +++ b/lib/cli/src/automigrate/fixes/cra5.test.ts @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +import path from 'path'; import { JsPackageManager } from '../../js-package-manager'; import { cra5 } from './cra5'; @@ -8,7 +9,7 @@ jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); const checkCra5 = async ({ packageJson, main }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ - '.storybook/main.js': `module.exports = ${JSON.stringify(main)};`, + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, }); const packageManager = { retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), diff --git a/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts b/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts index d4f9940a6a0e..b87856375474 100644 --- a/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts +++ b/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +import path from 'path'; import dedent from 'ts-dedent'; import { JsPackageManager } from '../../js-package-manager'; import { eslintPlugin } from './eslint-plugin'; @@ -14,7 +15,9 @@ const checkEslint = async ({ }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ - '.storybook/main.js': !main ? null : `module.exports = ${JSON.stringify(main)};`, + [path.join('.storybook', 'main.js')]: !main + ? null + : `module.exports = ${JSON.stringify(main)};`, [`.eslintrc.${eslintExtension}`]: !hasEslint ? null : dedent(` diff --git a/lib/cli/src/automigrate/fixes/webpack5.test.ts b/lib/cli/src/automigrate/fixes/webpack5.test.ts index 7d5f519cfe64..5406b2ed86f4 100644 --- a/lib/cli/src/automigrate/fixes/webpack5.test.ts +++ b/lib/cli/src/automigrate/fixes/webpack5.test.ts @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +import path from 'path'; import { JsPackageManager } from '../../js-package-manager'; import { webpack5 } from './webpack5'; @@ -8,7 +9,7 @@ jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); const checkWebpack5 = async ({ packageJson, main }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ - '.storybook/main.js': `module.exports = ${JSON.stringify(main)};`, + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, }); const packageManager = { retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), From 23383b7421dddbc0ad05497a5143951925d99da4 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 12:03:41 -0800 Subject: [PATCH 08/14] Increase timeouts for windows --- addons/a11y/src/components/A11YPanel.test.tsx | 15 +++++++++------ .../src/utils/watch-story-specifiers.test.ts | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/addons/a11y/src/components/A11YPanel.test.tsx b/addons/a11y/src/components/A11YPanel.test.tsx index b7e77b1e51a3..744e7e418b8b 100644 --- a/addons/a11y/src/components/A11YPanel.test.tsx +++ b/addons/a11y/src/components/A11YPanel.test.tsx @@ -129,11 +129,14 @@ describe('A11YPanel', () => { const { getByText } = render(); const useChannelArgs = mockedApi.useChannel.mock.calls[0][0]; act(() => useChannelArgs[EVENTS.RESULT](axeResult)); - await waitFor(() => { - expect(getByText(/Tests completed/)).toBeTruthy(); - expect(getByText(/Violations/)).toBeTruthy(); - expect(getByText(/Passes/)).toBeTruthy(); - expect(getByText(/Incomplete/)).toBeTruthy(); - }); + await waitFor( + () => { + expect(getByText(/Tests completed/)).toBeTruthy(); + expect(getByText(/Violations/)).toBeTruthy(); + expect(getByText(/Passes/)).toBeTruthy(); + expect(getByText(/Incomplete/)).toBeTruthy(); + }, + { timeout: 2000 } + ); }); }); diff --git a/lib/core-server/src/utils/watch-story-specifiers.test.ts b/lib/core-server/src/utils/watch-story-specifiers.test.ts index 53eb81dad074..cc03b45a9d94 100644 --- a/lib/core-server/src/utils/watch-story-specifiers.test.ts +++ b/lib/core-server/src/utils/watch-story-specifiers.test.ts @@ -79,7 +79,7 @@ describe('watchStorySpecifiers', () => { onInvalidate.mockClear(); await onChange('src/nested', 1234); expect(onInvalidate).toHaveBeenCalledWith(specifier, `./src/nested/Button.stories.ts`, false); - }); + }, 10000); it('watches single file globs', async () => { const specifier = normalizeStoriesEntry('../src/nested/Button.stories.mdx', options); From 4fca87bf54a7e30e7f8fea1eeed3cd3624ac2f86 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 12:24:58 -0800 Subject: [PATCH 09/14] Normalize windows paths in invalidation --- lib/core-server/src/utils/StoryIndexGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-server/src/utils/StoryIndexGenerator.ts b/lib/core-server/src/utils/StoryIndexGenerator.ts index f809cc430906..766eef946b1f 100644 --- a/lib/core-server/src/utils/StoryIndexGenerator.ts +++ b/lib/core-server/src/utils/StoryIndexGenerator.ts @@ -178,7 +178,7 @@ export class StoryIndexGenerator { } invalidate(specifier: NormalizedStoriesSpecifier, importPath: Path, removed: boolean) { - const absolutePath = path.resolve(this.options.workingDir, importPath); + const absolutePath = slash(path.resolve(this.options.workingDir, importPath)); const pathToEntries = this.storyIndexEntries.get(specifier); if (removed) { From 8d13cfecf034333c9c43359f7c48fc0bb354d4c6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 17:00:03 -0800 Subject: [PATCH 10/14] Do not use join in resolveFrom --- lib/core-common/src/presets.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core-common/src/presets.ts b/lib/core-common/src/presets.ts index cca6cb28251b..2f11ecd179ae 100644 --- a/lib/core-common/src/presets.ts +++ b/lib/core-common/src/presets.ts @@ -1,5 +1,5 @@ import dedent from 'ts-dedent'; -import { join, resolve } from 'path'; +import { resolve } from 'path'; import { logger } from '@storybook/node-logger'; import resolveFrom from 'resolve-from'; import { @@ -79,7 +79,7 @@ export const resolveAddonName = (configDir: string, name: string) => { try { return { - name: resolveFrom(configDir, join(name, 'preset')), + name: resolveFrom(configDir, `${name}/preset`), type: 'presets', }; // eslint-disable-next-line no-empty @@ -87,7 +87,7 @@ export const resolveAddonName = (configDir: string, name: string) => { try { return { - name: resolveFrom(configDir, join(name, 'register')), + name: resolveFrom(configDir, `${name}/register`), type: 'managerEntries', }; // eslint-disable-next-line no-empty From c8e0eabaa64b90fb1c65c387a15b2e191e1745c6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 17:01:39 -0800 Subject: [PATCH 11/14] Remove node 17 for now --- .github/workflows/tests-unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index 03fa946109a1..f37cff4ea4e2 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node_version: [12, 14, 16, 17] + node_version: [12, 14, 16] include: - os: macos-latest node_version: 16 From 2f781b8840694b9bf59c67ce900d690d513d75a3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 5 Dec 2021 17:51:11 -0800 Subject: [PATCH 12/14] Fix watch for windows directories --- lib/core-server/src/utils/watch-story-specifiers.test.ts | 2 +- lib/core-server/src/utils/watch-story-specifiers.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/core-server/src/utils/watch-story-specifiers.test.ts b/lib/core-server/src/utils/watch-story-specifiers.test.ts index cc03b45a9d94..53eb81dad074 100644 --- a/lib/core-server/src/utils/watch-story-specifiers.test.ts +++ b/lib/core-server/src/utils/watch-story-specifiers.test.ts @@ -79,7 +79,7 @@ describe('watchStorySpecifiers', () => { onInvalidate.mockClear(); await onChange('src/nested', 1234); expect(onInvalidate).toHaveBeenCalledWith(specifier, `./src/nested/Button.stories.ts`, false); - }, 10000); + }); it('watches single file globs', async () => { const specifier = normalizeStoriesEntry('../src/nested/Button.stories.mdx', options); diff --git a/lib/core-server/src/utils/watch-story-specifiers.ts b/lib/core-server/src/utils/watch-story-specifiers.ts index 8b4baf4d1a1f..f42221c512a5 100644 --- a/lib/core-server/src/utils/watch-story-specifiers.ts +++ b/lib/core-server/src/utils/watch-story-specifiers.ts @@ -73,9 +73,14 @@ export function watchStorySpecifiers( // because the directoru could already be within the files part (e.g. './x/foo/bar') path.basename(specifier.files) ); - const files = await glob(dirGlob); + // glob only supports forward slashes + const files = await glob(dirGlob.replace(/\\/g, '/')); + files.forEach((filePath) => { - const fileImportPath = toImportPath(path.relative(options.workingDir, filePath)); + const fileImportPath = toImportPath( + // use posix path separators even on windows + path.relative(options.workingDir, filePath).replace(/\\/g, '/') + ); if (specifier.importPathMatcher.exec(fileImportPath)) { onInvalidate(specifier, fileImportPath, removed); From 2497080f069efa6b06e69d360a4fab87d768a3c8 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sat, 11 Dec 2021 21:49:00 -0500 Subject: [PATCH 13/14] Limit execution of matrix CI in PRs --- .github/workflows/tests-unit.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index f37cff4ea4e2..d11b0eed311c 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -1,10 +1,16 @@ name: Unit tests -on: [push] +on: + push: + branches: + - next + pull_request: + types: [labeled] jobs: build: name: Core Unit Tests node-${{ matrix.node_version }}, ${{ matrix.os }} + if: ${{ github.event.label.name == 'ci:matrix' || github.event.type == 'push'}} strategy: fail-fast: false matrix: From dacc7552ea00d6fd39e10d34fbbc8929d7190f9e Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 12 Dec 2021 11:17:23 -0500 Subject: [PATCH 14/14] Include pull request with existing label --- .github/workflows/tests-unit.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index d11b0eed311c..c5fdc953a9fd 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -5,12 +5,15 @@ on: branches: - next pull_request: - types: [labeled] + types: [opened, reopened, labeled, synchronize] jobs: build: name: Core Unit Tests node-${{ matrix.node_version }}, ${{ matrix.os }} - if: ${{ github.event.label.name == 'ci:matrix' || github.event.type == 'push'}} + if: | + ${{ github.event.label.name == 'ci:matrix' || + contains(github.event.pull_request.labels.*.name, 'ci:matrix') || + github.event.type == 'push'}} strategy: fail-fast: false matrix: