Skip to content

Commit 1b21f21

Browse files
committed
?
1 parent 16b7b1d commit 1b21f21

File tree

7 files changed

+110
-112
lines changed

7 files changed

+110
-112
lines changed

site/.storybook/main.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
import turbosnap from "vite-plugin-turbosnap";
22

3-
module.exports = {
4-
stories: ["../src/**/*.stories.tsx"],
3+
export default {
4+
stories: ["../src/**/*.stories.tsx"],
55

6-
addons: [
7-
"@chromatic-com/storybook",
8-
{
9-
name: "@storybook/addon-essentials",
10-
options: {
11-
backgrounds: false,
12-
},
13-
},
14-
"@storybook/addon-links",
15-
"@storybook/addon-mdx-gfm",
16-
"@storybook/addon-themes",
17-
"@storybook/addon-actions",
18-
"@storybook/addon-interactions",
19-
"storybook-addon-remix-react-router",
20-
],
6+
addons: [
7+
"@chromatic-com/storybook",
8+
{
9+
name: "@storybook/addon-essentials",
10+
options: {
11+
backgrounds: false,
12+
},
13+
},
14+
"@storybook/addon-links",
15+
"@storybook/addon-mdx-gfm",
16+
"@storybook/addon-themes",
17+
"@storybook/addon-actions",
18+
"@storybook/addon-interactions",
19+
"storybook-addon-remix-react-router",
20+
],
2121

22-
staticDirs: ["../static"],
22+
staticDirs: ["../static"],
2323

24-
framework: {
25-
name: "@storybook/react-vite",
26-
options: {},
27-
},
24+
framework: {
25+
name: "@storybook/react-vite",
26+
options: {},
27+
},
2828

29-
async viteFinal(config, { configType }) {
30-
config.plugins = config.plugins || [];
31-
// return the customized config
32-
if (configType === "PRODUCTION") {
33-
// ignore @ts-ignore because it's not in the vite types yet
34-
config.plugins.push(
35-
turbosnap({
36-
rootDir: config.root || "",
37-
}),
38-
);
39-
}
40-
return config;
41-
},
29+
async viteFinal(config, { configType }) {
30+
config.plugins = config.plugins || [];
31+
// return the customized config
32+
if (configType === "PRODUCTION") {
33+
// ignore @ts-ignore because it's not in the vite types yet
34+
config.plugins.push(
35+
turbosnap({
36+
rootDir: config.root || "",
37+
}),
38+
);
39+
}
40+
return config;
41+
},
4242
};

site/jest.config.ts

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
module.exports = {
2-
// Use a big timeout for CI.
3-
testTimeout: 20_000,
4-
maxWorkers: 8,
5-
projects: [
6-
{
7-
displayName: "test",
8-
roots: ["<rootDir>"],
9-
setupFiles: ["./jest.polyfills.js"],
10-
setupFilesAfterEnv: ["./jest.setup.ts"],
11-
extensionsToTreatAsEsm: [".ts"],
12-
transform: {
13-
"^.+\\.(t|j)sx?$": [
14-
"@swc/jest",
15-
{
16-
jsc: {
17-
transform: {
18-
react: {
19-
runtime: "automatic",
20-
importSource: "@emotion/react",
21-
},
22-
},
23-
experimental: {
24-
plugins: [["jest_workaround", {}]],
25-
},
26-
},
27-
},
28-
],
29-
},
30-
testEnvironment: "jsdom",
31-
testEnvironmentOptions: {
32-
customExportConditions: [""],
33-
},
34-
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
35-
testPathIgnorePatterns: [
36-
"/node_modules/",
37-
"/e2e/",
38-
// TODO: This test is timing out after upgrade a few Jest dependencies
39-
// and I was not able to figure out why. When running it specifically, I
40-
// can see many act warnings that may can help us to find the issue.
41-
"/usePaginatedQuery.test.ts",
42-
],
43-
transformIgnorePatterns: [
44-
"<rootDir>/node_modules/@chartjs-adapter-date-fns",
45-
],
46-
moduleDirectories: ["node_modules", "<rootDir>/src"],
47-
moduleNameMapper: {
48-
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
49-
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
50-
},
51-
},
52-
],
53-
collectCoverageFrom: [
54-
// included files
55-
"<rootDir>/**/*.ts",
56-
"<rootDir>/**/*.tsx",
57-
// excluded files
58-
"!<rootDir>/**/*.stories.tsx",
59-
"!<rootDir>/_jest/**/*.*",
60-
"!<rootDir>/api.ts",
61-
"!<rootDir>/coverage/**/*.*",
62-
"!<rootDir>/e2e/**/*.*",
63-
"!<rootDir>/jest-runner.eslint.config.js",
64-
"!<rootDir>/jest.config.js",
65-
"!<rootDir>/out/**/*.*",
66-
"!<rootDir>/storybook-static/**/*.*",
67-
],
1+
export default {
2+
// Use a big timeout for CI.
3+
testTimeout: 20_000,
4+
maxWorkers: 8,
5+
projects: [
6+
{
7+
displayName: "test",
8+
roots: ["<rootDir>"],
9+
setupFiles: ["./jest.polyfills.js"],
10+
setupFilesAfterEnv: ["./jest.setup.ts"],
11+
extensionsToTreatAsEsm: [".ts"],
12+
transform: {
13+
"^.+\\.(t|j)sx?$": [
14+
"@swc/jest",
15+
{
16+
jsc: {
17+
transform: {
18+
react: {
19+
runtime: "automatic",
20+
importSource: "@emotion/react",
21+
},
22+
},
23+
experimental: {
24+
plugins: [["jest_workaround", {}]],
25+
},
26+
},
27+
},
28+
],
29+
},
30+
testEnvironment: "jsdom",
31+
testEnvironmentOptions: {
32+
customExportConditions: [""],
33+
},
34+
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
35+
testPathIgnorePatterns: [
36+
"/node_modules/",
37+
"/e2e/",
38+
// TODO: This test is timing out after upgrade a few Jest dependencies
39+
// and I was not able to figure out why. When running it specifically, I
40+
// can see many act warnings that may can help us to find the issue.
41+
"/usePaginatedQuery.test.ts",
42+
],
43+
transformIgnorePatterns: [
44+
"<rootDir>/node_modules/@chartjs-adapter-date-fns",
45+
],
46+
moduleDirectories: ["node_modules", "<rootDir>/src"],
47+
moduleNameMapper: {
48+
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
49+
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
50+
},
51+
},
52+
],
53+
collectCoverageFrom: [
54+
// included files
55+
"<rootDir>/**/*.ts",
56+
"<rootDir>/**/*.tsx",
57+
// excluded files
58+
"!<rootDir>/**/*.stories.tsx",
59+
"!<rootDir>/_jest/**/*.*",
60+
"!<rootDir>/api.ts",
61+
"!<rootDir>/coverage/**/*.*",
62+
"!<rootDir>/e2e/**/*.*",
63+
"!<rootDir>/jest-runner.eslint.config.js",
64+
"!<rootDir>/jest.config.js",
65+
"!<rootDir>/out/**/*.*",
66+
"!<rootDir>/storybook-static/**/*.*",
67+
],
6868
};

site/jest.setup.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,3 @@ afterEach(() => {
6969

7070
// Clean up after the tests are finished.
7171
afterAll(() => server.close());
72-
73-
// biome-ignore lint/complexity/noUselessEmptyExport: This is needed because we are compiling under `--isolatedModules`
74-
export {};

site/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"repository": "https://github.com/coder/coder",
55
"private": true,
66
"license": "AGPL-3.0",
7+
"type": "module",
78
"scripts": {
89
"build": "NODE_ENV=production pnpm vite build",
910
"check": "biome check --error-on-warnings e2e/ src/",

site/postcss.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module.exports = {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
5-
},
6-
}
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

site/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @type {import('tailwindcss').Config} */
2-
module.exports = {
2+
export default {
33
corePlugins: {
44
preflight: false,
55
},
File renamed without changes.

0 commit comments

Comments
 (0)