Skip to content

Commit

Permalink
DRAFT PNPM 2(#4932)
Browse files Browse the repository at this point in the history
* remove console.log

* fix ci test

* fix cache ci test

* fix gha + jest config

* fix node_modules path, upgrade babel/core, keep jest only in scripts-core

* chore: pnpm-deduplicate

* add @talend/scripts-config-storybook-lib in every package having storybook

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
smouillour and github-actions[bot] authored Oct 13, 2023
1 parent 8b6656e commit c2acf07
Show file tree
Hide file tree
Showing 31 changed files with 2,221 additions and 2,330 deletions.
14 changes: 7 additions & 7 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ secrets:
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
scope: '@talend'
# cache: 'pnpm'

- name: Install pnpm
shell: bash
run: npm i -g pnpm
cache: 'pnpm'

- name: Get pnpm cache directory path
id: pnpm-cache-dir-path
shell: bash
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
id: pnpm-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
2 changes: 1 addition & 1 deletion .github/workflows/pr-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: |
pnpm test:demo
pnpm run test:demo
./.github/workflows/before-surge.sh
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.STORYBOOK_FIGMA_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm test --coverage --coverageReporters json-summary
run: pnpm run test --coverage --coverageReporters json-summary

- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@41b5ca01d1250de84537448d248b8d18152cb277 #1.0.23
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ prefer-workspace-packages=true
#link-workspace-packages=false
#link-workspace-packages=deep
#strict-peer-dependencies=true
#public-hoist-pattern[]=*storybook*
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"lint-merge-report": "pnpm -r lint-merge-report",
"test": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent",
"test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent -u",
"test:cov": "cross-env TZ=Europe/Paris pnpm -r run test:cov",
"test:demo": "pnpm -r run test:demo",
"test:cron": "pnpm -r run test:cron",
"test:cov": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test:cov",
"test:demo": "pnpm -r --no-bail run test:demo",
"test:cron": "pnpm -r --no-bail run test:cron",
"start-components": "pnpm --filter @talend/react-components run start",
"start-containers": "pnpm --filter @talend/react-containers run start",
"start-stepper": "pnpm --filter @talend/react-stepper run start",
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-react-webpack": "^16.1.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
Expand Down
1 change: 1 addition & 0 deletions packages/containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@talend/react-storybook-cmf": "^7.2.0",
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
Expand Down
1 change: 1 addition & 0 deletions packages/dataviz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@testing-library/react": "^12.1.5",
"@testing-library/cypress": "^9.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/design-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@talend/locales-tui-forms": "^9.0.1",
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@types/react": "^17.0.65",
"i18next": "^20.6.1",
Expand Down
1 change: 1 addition & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@talend/storybook-docs": "^1.2.0",
"@testing-library/cypress": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": [
"../../node_modules/cypress",
"node_modules/cypress",
"cypress/**/*",
".storybook/docs/**/*",
"src/**/*",
Expand Down
1 change: 1 addition & 0 deletions packages/faceted-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
"babel-plugin-angularjs-annotate": "^0.10.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-designer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"allowJs": false,
"incremental": true,
"module": "CommonJs",
"typeRoots": ["src/customTypings/index.d", "../../node_modules/@types"]
"typeRoots": ["src/customTypings/index.d", "node_modules/@types"]
}
}
3 changes: 2 additions & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"dependencies": {
"@talend/assets-api": "^1.2.2",
"@talend/icons": "^6.60.1",
"@talend/json-schema-form-core": "^1.1.1",
"@talend/react-components": "^11.4.0",
"@talend/design-system": "^7.15.1",
Expand All @@ -59,12 +60,12 @@
"@storybook/addon-actions": "^7.4.1",
"@storybook/addon-controls": "^7.4.1",
"@talend/bootstrap-theme": "^8.1.3",
"@talend/icons": "^6.60.1",
"@talend/locales-tui-forms": "^9.0.1",
"@talend/react-components": "^11.4.0",
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
Expand Down
1 change: 1 addition & 0 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@talend/scripts-config-typescript": "^11.1.0",
"@talend/babel-plugin-assets-api": "^1.1.0",
"@talend/babel-plugin-import-from-index": "^1.5.1",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/design-tokens": "^2.9.0",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^10.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsfc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../node_modules/@talend/scripts-config-typescript/tsconfig.json",
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"declaration": true,
Expand Down
1 change: 1 addition & 0 deletions packages/stepper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-prettier": "^12.0.0",
"@talend/scripts-config-react-webpack": "^16.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0",
"@talend/scripts-core": "^15.0.0",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/storybook-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"devDependencies": {
"@talend/scripts-core": "^15.0.0",
"@talend/scripts-config-babel": "^13.0.0",
"@talend/scripts-config-storybook-lib": "^5.0.0",
"@talend/scripts-config-typescript": "^11.1.0"
}
}
Loading

0 comments on commit c2acf07

Please sign in to comment.