Skip to content

Commit

Permalink
chore: rebase main (#193)
Browse files Browse the repository at this point in the history
* chore: update node in actions to 18 (#191)

* chore: update node in actions to 18

* feat: upgrade lock version to 3

* fix: lint fixes

* chore: fix main-preview action (#192)

* feat(Yagr plugin)!: update to v3 (#180)

* feat!: updated Yagr version

* fix: updated package-lock, added npmrc

* fix: switched to npm@8 to have lock version of 2

* chore: fixed jest config

* feat: updated yagr to 3.3.0

* fix: bumped yarg patch version

* fix: fix rebase artifacts

---------

Co-authored-by: Алаев Евгений <[email protected]>

* fix: build fixes (#190)

* chore: lock fixes

---------

Co-authored-by: Trdat Mkrtchyan <[email protected]>
  • Loading branch information
korvin89 and zefirka authored Jul 5, 2023
1 parent 7d7980c commit b52f1a3
Show file tree
Hide file tree
Showing 10 changed files with 17,702 additions and 54,532 deletions.
16 changes: 16 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
node-version: 18
cache: 'npm'
- name: Install Packages
run: npm ci
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
node-version: 18
cache: 'npm'
- name: Install Packages
run: npm ci
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/main-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
run: npm ci
shell: bash
- name: Build Storybook
run: npx build-storybook
run: npx sb build
shell: bash
env:
TS_NODE_PROJECT: .storybook/tsconfig.json
- name: Upload to S3
uses: gravity-ui/preview-upload-to-s3-action@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: gravity-ui/preview-build-action@v1
env:
TS_NODE_PROJECT: .storybook/tsconfig.json
with:
node-version: 18
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
registry=https://registry.npmjs.org
legacy-peer-deps=true
legacy-peer-deps=true
39 changes: 10 additions & 29 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
import type {StorybookConfig} from '@storybook/core-common';
import type {StorybookConfig} from '@storybook/react-webpack5';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(ts|tsx)'],
framework: {
name: '@storybook/react-webpack5',
options: {fastRefresh: true},
},
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(ts|tsx)'],
docs: {
autodocs: false,
},
addons: [
'@storybook/preset-scss',
{name: '@storybook/addon-essentials', options: {backgrounds: false}},
'./theme-addon/register.tsx',
],
webpackFinal: async (config) => {
const babelModuleIdx = config.module?.rules?.findIndex((rule) => {
const use = (Array.isArray(rule.use) ? rule.use?.[0] : rule.use) as {loader: string};
return use.loader?.includes('babel-loader') && typeof rule.include === 'function';
});

if (babelModuleIdx === undefined || babelModuleIdx === -1) {
return config;
}

if (config.module?.rules?.[babelModuleIdx]?.include) {
const ii = config.module?.rules?.[babelModuleIdx]?.include as (s: string) => boolean;
config.module.rules[babelModuleIdx].include = (input: string) => {
const res = ii(input);
if (
input.includes('node_modules/uplot') ||
input.includes('node_modules/@gravity-ui/yagr')
) {
return true;
}
return res;
};
}

return config;
},
};

module.exports = config;
export default config;
7 changes: 0 additions & 7 deletions .storybook/tsconfig.json

This file was deleted.

Loading

0 comments on commit b52f1a3

Please sign in to comment.