Skip to content

Commit

Permalink
feat(Yagr plugin)!: update to v3 (#180)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
zefirka and korvin89 committed Jul 24, 2023
1 parent a23fbd6 commit 91b39d5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ const config: StorybookConfig = {
{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;
},
};

export default config;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@
"typescript": "^4.9.5"
},
"peerDependencies": {
<<<<<<< HEAD
"@gravity-ui/uikit": "^5.0.0",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
"highcharts": "^8.2.2",
"highcharts-react-official": "^3.2.0"
=======
"@gravity-ui/uikit": "^4.0.0",
"moment": "^2.19.3",
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
>>>>>>> bf809c4 (feat(Yagr plugin)!: update to v3 (#180))
},
"scripts": {
"test": "jest",
Expand Down
1 change: 1 addition & 0 deletions src/plugins/yagr/__stories__/Yagr.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ const UpdatesTemplate: Story<any> = () => {
</div>
);
};

export const Line = LineTemplate.bind({});
export const Updates = UpdatesTemplate.bind({});

0 comments on commit 91b39d5

Please sign in to comment.