Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update wait-on and lockfile #389

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
Loading