From b90cfeacb918662fb41f256aa3601e91110db9d5 Mon Sep 17 00:00:00 2001 From: Dan Onoshko Date: Fri, 23 Sep 2022 16:11:38 +0700 Subject: [PATCH] ci: remove compat mode (#1358) --- .github/workflows/update-storyshots.yml | 29 +------------------------ .storybook/main.js | 20 ++++++++++------- package.json | 1 - pnpm-lock.yaml | 10 ++------- test/mock/compat.ts | 13 ----------- 5 files changed, 15 insertions(+), 58 deletions(-) delete mode 100644 test/mock/compat.ts diff --git a/.github/workflows/update-storyshots.yml b/.github/workflows/update-storyshots.yml index efd457a5..2a037b08 100644 --- a/.github/workflows/update-storyshots.yml +++ b/.github/workflows/update-storyshots.yml @@ -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__/ diff --git a/.storybook/main.js b/.storybook/main.js index 6fd986ea..913f5145 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -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: [ @@ -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; } diff --git a/package.json b/package.json index abbc4a75..64711401 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83a3d6c2..cea6ff02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,6 @@ specifiers: '@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 @@ -86,7 +85,6 @@ devDependencies: '@typescript-eslint/eslint-plugin': 5.25.0_qo2hgs5jt7x2a3p77h2rutcdae '@typescript-eslint/parser': 5.25.0_hcfsmds2fshutdssjqluwm76uu browserslist: 4.20.2 - chartist: 0.11.4 clean-publish: 4.0.1 commitizen: 4.2.4_@swc+core@1.2.165 cssnano: 4.1.11 @@ -6496,11 +6494,6 @@ packages: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true - /chartist/0.11.4: - resolution: {integrity: sha512-H4AimxaUD738/u9Mq8t27J4lh6STsLi4BQHt65nOtpLk3xyrBPaLiLMrHw7/WV9CmsjGA02WihjuL5qpSagLYw==} - engines: {node: '>=4.6.0'} - dev: true - /chokidar/2.1.8: resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies @@ -7043,8 +7036,8 @@ packages: engines: {node: '>=10'} hasBin: true dependencies: - is-text-path: 1.0.1 JSONStream: 1.3.5 + is-text-path: 1.0.1 lodash: 4.17.21 meow: 8.1.2 split2: 3.2.2 @@ -15935,6 +15928,7 @@ packages: /unified/9.2.0: resolution: {integrity: sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==} dependencies: + '@types/unist': 2.0.6 bail: 1.0.5 extend: 3.0.2 is-buffer: 2.0.5 diff --git a/test/mock/compat.ts b/test/mock/compat.ts deleted file mode 100644 index 2100863a..00000000 --- a/test/mock/compat.ts +++ /dev/null @@ -1,13 +0,0 @@ -import Chartist from 'chartist'; - -export const { - Bar: BarChart, - Line: LineChart, - Pie: PieChart, - AutoScaleAxis, - Svg, - Interpolation, - getMultiValue -} = Chartist; - -export const { Easing: easings } = Svg;