Skip to content

Commit 8c8c4f7

Browse files
committed
remove debugging code
1 parent 414dc64 commit 8c8c4f7

File tree

8 files changed

+165
-15
lines changed

8 files changed

+165
-15
lines changed

.github/workflows/lint.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
linux:
10+
timeout-minutes: 30
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node 20
18+
uses: actions/setup-node@v4
19+
env:
20+
FORCE_COLOR: 0
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Lint
29+
run: npm run lint

.github/workflows/verify-browser.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Browser tests
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
verify-linux:
10+
timeout-minutes: 30
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node 20
18+
uses: actions/setup-node@v4
19+
env:
20+
FORCE_COLOR: 0
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Build packages
29+
run: npm run build
30+
31+
# build for production in CI to make sure tests can run with production build
32+
- name: Build specific packages for production
33+
run: npm run build:production
34+
35+
- name: Test
36+
run: npm run test:browser

.github/workflows/verify-node.yml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Node tests
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
verify-linux:
10+
timeout-minutes: 30
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version:
16+
- '18'
17+
- '20'
18+
- 'latest'
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Node ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
env:
26+
FORCE_COLOR: 0
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: npm
30+
31+
- name: Install Playwright dependencies
32+
run: npx playwright install --with-deps
33+
34+
# Set up GitHub Actions caching for Wireit.
35+
- uses: google/wireit@setup-github-actions-caching/v1
36+
37+
- name: Install Dependencies
38+
run: npm ci
39+
40+
- name: Build packages
41+
run: npm run build
42+
43+
- name: Build types for js packages
44+
run: npm run types
45+
46+
# build for production in CI to make sure tests can run with production build
47+
- name: Build specific packages for production
48+
run: npm run build:production
49+
50+
- name: Test
51+
run: npm run test:node
52+
53+
verify-windows:
54+
timeout-minutes: 30
55+
name: Windows
56+
runs-on: windows-2022
57+
steps:
58+
- name: Set git to use LF
59+
run: |
60+
git config --global core.autocrlf false
61+
git config --global core.eol lf
62+
63+
- uses: actions/checkout@v4
64+
65+
- name: Setup Node '20'
66+
uses: actions/setup-node@v4
67+
env:
68+
FORCE_COLOR: 0
69+
with:
70+
node-version: '20'
71+
cache: 'npm'
72+
73+
- name: Install Playwright dependencies
74+
run: npx playwright install --with-deps
75+
76+
# Set up GitHub Actions caching for Wireit.
77+
- uses: google/wireit@setup-github-actions-caching/v1
78+
79+
- name: Install Dependencies
80+
run: npm ci
81+
82+
- name: Build
83+
run: npm run build
84+
85+
# build for production in CI to make sure tests can run with production build
86+
- name: Build specific packages for production
87+
run: npm run build:production
88+
89+
- name: Test
90+
run: npm run test:node

.github/workflows/verify-storybook-builder.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Linux
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212

1313
- name: Setup Node 20
1414
uses: actions/setup-node@v4
@@ -27,6 +27,9 @@ jobs:
2727
- name: Symlink built packages binaries (e.g. "wds")
2828
run: npm ci
2929

30+
- name: Install Playwright Browsers
31+
run: npx playwright install --with-deps
32+
3033
- name: Run tests
3134
run: npm run test:storybook-builder
3235

@@ -42,7 +45,7 @@ jobs:
4245
name: Windows
4346
runs-on: windows-2022
4447
steps:
45-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v4
4649

4750
- name: Setup Node 20
4851
uses: actions/setup-node@v4
@@ -61,6 +64,9 @@ jobs:
6164
- name: Symlink built packages binaries (e.g. "wds")
6265
run: npm ci
6366

67+
- name: Install Playwright Browsers
68+
run: npx playwright install --with-deps
69+
6470
- name: Run tests
6571
run: npm run test:storybook-builder
6672

packages/storybook-builder/src/generate-stories-script.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { normalizePath } from '@rollup/pluginutils';
44
import { logger } from '@storybook/node-logger';
55
import type { Options } from '@storybook/types';
66
import * as path from 'path';
7-
import { pathToFileURL } from 'url';
87
import { listStories } from './list-stories.js';
98

109
/**
@@ -16,11 +15,7 @@ export async function generateStoriesScript(options: Options) {
1615
const stories = await listStories(options);
1716

1817
// We can then call toImportFn to create a function that can be used to load each story dynamically.
19-
const code = (await toImportFn(stories)).trim();
20-
21-
console.log('generateStoriesScript', code);
22-
23-
return code;
18+
return (await toImportFn(stories)).trim();
2419
}
2520

2621
/**

packages/storybook-builder/src/rollup-plugin-mdx.ts

-5
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@ export function rollupPluginMdx(storybookOptions: Options): Plugin {
2323
async resolveId(id) {
2424
if (id.endsWith('.mdx.js')) {
2525
return id;
26-
console.log('resolveId > id', id);
2726
}
2827
},
2928

3029
async load(id) {
3130
if (!id.endsWith('.mdx.js')) return;
3231

3332
const mdxPath = id.replace(/\.js$/, '');
34-
35-
console.log('load > mdxPath', mdxPath);
36-
console.log('load > mdxPath.split(/).join(sep)', mdxPath.split('/').join(sep));
37-
3833
const mdxCode = await readFile(mdxPath.split('/').join(sep), 'utf8');
3934

4035
const mdxLoaderOptions = await storybookOptions.presets.apply('mdxLoaderOptions', {

packages/storybook-builder/src/rollup-plugin-prebundle-modules.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { esbuildPluginCommonjsNamedExports } from './esbuild-plugin-commonjs-nam
77
import { getNodeModuleDir } from './get-node-module-dir.js';
88

99
export const PREBUNDLED_MODULES_DIR = normalize('node_modules/.prebundled_modules');
10-
console.log('PREBUNDLED_MODULES_DIR', PREBUNDLED_MODULES_DIR);
1110

1211
export function rollupPluginPrebundleModules(env: Record<string, string>): Plugin {
1312
const modulePaths: Record<string, string> = {};

packages/storybook-framework-web-components/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"scripts": {
3030
"build": "tsc",
31-
"test": "npm run test:build",
31+
"test": "npm run test:build && npm run test:ui:build && npm run test:ui:runtime",
3232
"test:build": "storybook build -c ./tests/fixtures/all-in-one/.storybook -o ./tests/fixtures/all-in-one/storybook-build",
3333
"test:start:build": "wds -r ./tests/fixtures/all-in-one/storybook-build -p 3000",
3434
"test:start:runtime": "storybook dev -c ./tests/fixtures/all-in-one/.storybook -p 3000 --no-open",

0 commit comments

Comments
 (0)