Skip to content

Commit 8754e6a

Browse files
authored
Merge pull request #10 from zendesk/next
initial implementation of operation tracking
2 parents c69025e + 9d9d5e0 commit 8754e6a

File tree

119 files changed

+61171
-13424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+61171
-13424
lines changed

.config/beemo/eslint.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { ESLintConfig } from '@beemo/driver-eslint'
33
const config: ESLintConfig = {
44
rules: {
55
'@typescript-eslint/member-ordering': 'off',
6+
'@typescript-eslint/lines-between-class-members': 'off',
7+
'import/export': 'off',
68
// just in case we want to support older browsers
79
'unicorn/prefer-at': 'off',
10+
'import/no-deprecated': 'off',
811
'compat/compat': 'off',
912
},
1013
}

.config/beemo/typescript.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import type TypeScript from '@niieani/scaffold/src/configs/typescript'
33
export default {
44
compilerOptions: {
55
jsx: 'react',
6-
target: 'es2015',
6+
target: 'es2023' as 'es2022',
7+
verbatimModuleSyntax: true,
78
},
89
'ts-node': {
910
compilerOptions: {

.github/workflows/ci-cd.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
node: [16, 18]
20+
node: [22]
2121
steps:
22-
- uses: zendesk/checkout@v3
23-
- uses: zendesk/setup-node@v3
22+
- uses: zendesk/checkout@v4
23+
- uses: zendesk/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node }}
2626
cache: 'yarn'
@@ -36,10 +36,10 @@ jobs:
3636
runs-on: ubuntu-latest
3737
if: github.actor != 'github-actions[bot]' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next')
3838
steps:
39-
- uses: zendesk/checkout@v3
40-
- uses: zendesk/setup-node@v3
39+
- uses: zendesk/checkout@v4
40+
- uses: zendesk/setup-node@v4
4141
with:
42-
node-version: 16
42+
node-version: 20
4343
scope: zendesk
4444
always-auth: 'true'
4545
cache: 'yarn'

.github/workflows/publish-storybook.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ on:
55
branches:
66
- main
77
- next
8-
8+
99
workflow_dispatch:
1010

1111
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1212
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1313
concurrency:
14-
group: "pages"
14+
group: 'pages'
1515
cancel-in-progress: false
1616

1717
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
1818
permissions:
1919
contents: read
20-
pages: write
21-
id-token: write
20+
pages: write
21+
id-token: write
2222

2323
jobs:
2424
build-storybook:
@@ -29,7 +29,7 @@ jobs:
2929
- uses: zendesk/checkout@v4
3030
- uses: zendesk/setup-node@v4
3131
with:
32-
node-version: 20
32+
node-version: 22
3333
scope: zendesk
3434
always-auth: 'true'
3535
cache: 'yarn'
@@ -41,17 +41,16 @@ jobs:
4141
uses: actions/upload-pages-artifact@v3
4242
with:
4343
path: ./storybook-static
44-
44+
4545
deploy:
4646
needs: build-storybook
4747
runs-on: ubuntu-latest
4848

4949
environment:
5050
name: github-pages
5151
url: ${{ steps.deployment.outputs.page_url }}
52-
52+
5353
steps:
5454
- name: Deploy to Github Pages
5555
id: deployment
5656
uses: actions/deploy-pages@v4
57-

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ node_modules/
5050

5151
.DS_Store
5252
*.local
53+
54+
/storybook-static

.storybook/main.ts

+39-26
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,52 @@
1-
import type { StorybookConfig } from '@storybook/react-vite'
1+
import type { StorybookConfig } from '@storybook/react-webpack5'
22
import remarkGfm from 'remark-gfm'
3+
// import { mergeConfig } from 'vite'
34

45
const config: StorybookConfig = {
56
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
67
addons: [
7-
'@storybook/addon-links',
8-
'@storybook/addon-interactions',
9-
'@storybook/addon-actions',
10-
'@storybook/addon-viewport',
11-
{
12-
name: '@storybook/addon-docs',
13-
options: {
14-
mdxPluginOptions: {
15-
mdxCompileOptions: {
16-
remarkPlugins: [remarkGfm],
17-
},
18-
},
19-
},
20-
},
21-
'@storybook/addon-controls',
22-
'@storybook/addon-backgrounds',
23-
'@storybook/addon-toolbars',
24-
'@storybook/addon-measure',
25-
'@storybook/addon-outline',
8+
'@storybook/addon-essentials',
9+
'@storybook/addon-webpack5-compiler-swc',
2610
],
27-
framework: {
28-
name: '@storybook/react-vite',
29-
options: {},
30-
},
11+
framework: '@storybook/react-webpack5',
12+
// framework: {
13+
// // name: '@storybook/react-vite',
14+
// name: '@storybook/react-webpack5',
15+
// options: {},
16+
// },
3117
core: {},
3218
// other storybook options...,
33-
async viteFinal(config, options) {
34-
// modify and return config
19+
webpackFinal(config, options) {
20+
const assetRule = config.module?.rules?.find(
21+
(m) =>
22+
typeof m === 'object' &&
23+
m.test instanceof RegExp &&
24+
m.test.test('.svg'),
25+
)
26+
if (!assetRule || typeof assetRule !== 'object') {
27+
throw new Error('SVG rule not found')
28+
}
29+
assetRule.test =
30+
/\.(ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/
31+
32+
config.module?.rules?.unshift({
33+
test: /\.svg$/,
34+
// issuer: /\.[jt]sx?$/,
35+
use: [
36+
{ loader: '@svgr/webpack', options: { exportType: 'named' } },
37+
'url-loader',
38+
],
39+
// type: 'asset/resource',
40+
// generator: { filename: 'static/media/[path][name][ext]' }
41+
})
3542
return config
3643
},
44+
typescript: {
45+
check: false,
46+
reactDocgen: 'react-docgen',
47+
reactDocgenTypescriptOptions: {}, // Available only when reactDocgen is set to 'react-docgen-typescript'
48+
// skipCompiler: true,
49+
},
3750
docs: {
3851
autodocs: true,
3952
},

.storybook/preview.ts

+23-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
export const parameters = {
2-
actions: { argTypesRegex: "^on[A-Z].*" },
3-
controls: {
4-
matchers: {
5-
color: /(background|color)$/i,
6-
date: /Date$/,
1+
import type { Preview } from '@storybook/react'
2+
// import type { IndexEntry } from '@storybook/types';
3+
4+
const preview: Preview = {
5+
parameters: {
6+
actions: { argTypesRegex: '^on[A-Z].*' },
7+
layout: 'fullscreen',
8+
options: {
9+
// a and b are of type IndexEntry, but adding the type annotations generates a syntax warning in the console for some reason
10+
storySort: (a, b) => {
11+
if (a.title.includes('Visualizer')) return -1
12+
if (b.title.includes('Visualizer')) return 1
13+
return 0
14+
},
15+
},
16+
controls: {
17+
matchers: {
18+
color: /(background|color)$/i,
19+
date: /Date$/,
20+
},
721
},
822
},
9-
}
23+
}
24+
25+
export default preview

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

-541
This file was deleted.

.yarn/plugins/@yarnpkg/plugin-typescript.cjs

-9
This file was deleted.

.yarn/releases/yarn-3.2.2.cjs

-783
This file was deleted.

.yarn/releases/yarn-4.8.1.cjs

+935
Large diffs are not rendered by default.

.yarnrc

-1
This file was deleted.

.yarnrc.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
15
nodeLinker: node-modules
26

37
plugins:
4-
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5-
spec: '@yarnpkg/plugin-interactive-tools'
6-
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
7-
spec: '@yarnpkg/plugin-typescript'
88
- path: .yarn/plugins/@yarnpkg/plugin-postinstall-dev.cjs
9-
spec: 'https://raw.githubusercontent.com/sachinraja/yarn-plugin-postinstall-dev/main/bundles/%40yarnpkg/plugin-postinstall-dev.js'
9+
spec: "https://raw.githubusercontent.com/sachinraja/yarn-plugin-postinstall-dev/main/bundles/%40yarnpkg/plugin-postinstall-dev.js"
10+
11+
yarnPath: .yarn/releases/yarn-4.8.1.cjs

0 commit comments

Comments
 (0)