Skip to content

Commit

Permalink
Merge pull request #389 from storybookjs/fix/update-lockfile
Browse files Browse the repository at this point in the history
Chore: update wait-on and lockfile
  • Loading branch information
yannbf committed Nov 15, 2023
2 parents abdeace + 81c8ea1 commit e44e844
Show file tree
Hide file tree
Showing 9 changed files with 2,223 additions and 2,280 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
assert_test_runner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

Expand Down Expand Up @@ -98,10 +98,10 @@ jobs:
assert_test_runner_failures:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'skip release')"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
if: ${{ github.event.label.name == 'stress test' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16.x

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ jobs:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run test runner (story store v7)
run: |
yarn build
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -23,6 +23,9 @@ jobs:
run: |
yarn test --coverage
- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run test runner
run: |
yarn build
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '14.x'
Expand Down Expand Up @@ -342,7 +342,7 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '14.x'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"tsup": "^6.5.0",
"typescript": "~4.9.4",
"vite": "^4.4.5",
"wait-on": "^6.0.0"
"wait-on": "^7.2.0"
},
"lint-staged": {
"*.{ts,js,tsx,jsx,css,md}": "prettier --write"
Expand Down
13 changes: 7 additions & 6 deletions src/util/getStorybookMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StorybookConfig } from '@storybook/types';
import * as storybookMain from './getStorybookMain';

import { getStorybookMetadata } from './getStorybookMetadata';
Expand All @@ -22,7 +23,7 @@ describe('getStorybookMetadata', () => {
});

it('should return configDir coming from environment variable', () => {
const mockedMain = {
const mockedMain: Pick<StorybookConfig, 'stories'> = {
stories: [],
};

Expand All @@ -33,7 +34,7 @@ describe('getStorybookMetadata', () => {
});

it('should return storiesPath with default glob from CSF3 style config', () => {
const mockedMain = {
const mockedMain: Pick<StorybookConfig, 'stories'> = {
stories: [
{
directory: '../stories/basic',
Expand All @@ -51,7 +52,7 @@ describe('getStorybookMetadata', () => {
});

it('should return storiesPath with glob defined in CSF2 style config', () => {
const mockedMain = {
const mockedMain: Pick<StorybookConfig, 'stories'> = {
stories: ['../**/stories/*.stories.@(js|ts)'],
};

Expand All @@ -64,7 +65,7 @@ describe('getStorybookMetadata', () => {
});

it('should return storiesPath from mixed CSF2 and CSF3 style config', () => {
const mockedMain = {
const mockedMain: Pick<StorybookConfig, 'stories'> = {
stories: [
{
directory: '../stories/basic',
Expand All @@ -83,14 +84,14 @@ describe('getStorybookMetadata', () => {
});

it('should return lazyCompilation=false when unset', () => {
const mockedMain = { stories: [] };
const mockedMain: Pick<StorybookConfig, 'stories'> = { stories: [] };

jest.spyOn(storybookMain, 'getStorybookMain').mockReturnValueOnce(mockedMain);
process.env.STORYBOOK_CONFIG_DIR = '.storybook';
expect(getStorybookMetadata().lazyCompilation).toBe(false);
});
it('should return lazyCompilation=true when set', () => {
const mockedMain = {
const mockedMain: Pick<StorybookConfig, 'stories' | 'core'> = {
stories: [],
core: { builder: { name: 'webpack5', options: { lazyCompilation: true } } },
};
Expand Down

0 comments on commit e44e844

Please sign in to comment.