Skip to content

Commit

Permalink
ci: remove compat mode (#1358)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen authored Sep 23, 2022
1 parent b431f76 commit b90cfea
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 58 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/update-storyshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,10 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Update snapshots
run: pnpm test:storyshots -- -u
run: pnpm test:storyshots -u
- name: Collect artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: Updated storyshots
path: test/__image_snapshots__/
update-legacy-storyshots:
runs-on: ubuntu-latest
name: legacy storyshots
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7.5.0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Update snapshots
run: pnpm test:storyshots -- -u
env:
CHARTIST_COMPAT: true
- name: Collect artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: Updated legacy storyshots
path: test/__image_snapshots__/
20 changes: 12 additions & 8 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
const path = require('path');

const isCompatMode = process.env.CHARTIST_COMPAT === 'true';

module.exports = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
Expand All @@ -19,12 +17,18 @@ module.exports = {
)
});

config.resolve.alias['chartist-dev/styles$'] = isCompatMode
? 'chartist/dist/chartist.css'
: path.resolve(__dirname, '..', 'src', 'styles', 'chartist.scss');
config.resolve.alias['chartist-dev$'] = isCompatMode
? path.resolve(__dirname, '..', 'test', 'mock', 'compat.ts')
: path.resolve(__dirname, '..', 'src');
config.resolve.alias['chartist-dev/styles$'] = path.resolve(
__dirname,
'..',
'src',
'styles',
'chartist.scss'
);
config.resolve.alias['chartist-dev$'] = path.resolve(
__dirname,
'..',
'src'
);

return config;
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"browserslist": "^4.20.2",
"chartist": "^0.11.4",
"clean-publish": "^4.0.1",
"commitizen": "^4.2.4",
"cssnano": "^4.1.11",
Expand Down
10 changes: 2 additions & 8 deletions pnpm-lock.yaml

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

13 changes: 0 additions & 13 deletions test/mock/compat.ts

This file was deleted.

0 comments on commit b90cfea

Please sign in to comment.