Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT PNPM #4931

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9e1dac4
big commit pnpm
Oct 12, 2023
03d2f1a
syn with master
Oct 12, 2023
de2c965
add warn pnpm
Oct 12, 2023
160eaf7
fix
Oct 12, 2023
5654709
fix: build icons
jmfrancois Oct 12, 2023
3bd4e96
chore: remove enzyme and fix some lint
jmfrancois Oct 12, 2023
c72ba53
fix: prettier
jmfrancois Oct 12, 2023
9528a05
chore: lint forms
jmfrancois Oct 12, 2023
d104543
chore: CI on pnpm
jmfrancois Oct 12, 2023
2b87eee
chore: CI use pnpm everywhere
jmfrancois Oct 12, 2023
d4250ea
chore: remove cache-loader deprecated webpack plugin
jmfrancois Oct 12, 2023
930d566
npmrc + remove @talend/scripts-config-babel
Oct 12, 2023
32e236c
chore: add typescript config devDep for VSCode
jmfrancois Oct 12, 2023
7ed6a6a
Merge branch 'smouillour/fix/TDOPS-5327-pnpm' of github.com:Talend/ui…
jmfrancois Oct 12, 2023
fd29e1c
revert
Oct 12, 2023
c1b527b
add "@talend/scripts-config-typescript": "^11.1.0" in package having …
Oct 12, 2023
3313a64
add @talend/scripts-config-babel in each package with babel file
Oct 12, 2023
19c72e7
fix import testing-library
Oct 12, 2023
bb9e680
a11n add compiler option with type jest
Oct 12, 2023
e5d894a
add compiler option in http to add type jest
Oct 12, 2023
092b39d
fix package util adding type lodash
Oct 12, 2023
8cf2480
try to fix issue with jsfc (missing babel-loader)
Oct 12, 2023
fd58ec4
revert change made on jsfc
Oct 12, 2023
6749610
remove babel-loader to config-react-webpack and add it (+add webapp) …
Oct 12, 2023
7459b77
Merge 67496107ffbb4cabcc41b97ac4e16ee7968c12e9 into cd04f75e88298e9b8…
smouillour Oct 12, 2023
527af9c
chore: pnpm-deduplicate
github-actions[bot] Oct 12, 2023
9001885
remove yarn in tool-versions
Oct 12, 2023
4e7be57
change way to call webpack in build-lib-umd
Oct 12, 2023
8b6656e
try something to inprove findPackagesFromScopeFolder for PNPM
Oct 12, 2023
c2acf07
DRAFT PNPM 2(#4932)
smouillour Oct 13, 2023
9bc0d00
fix lockfile
Oct 13, 2023
f305cfb
More fixes (#4934)
smouillour Oct 17, 2023
813cdca
DRAFT PNPM 5 (more fixes) (#4938)
smouillour Oct 19, 2023
89ed2f3
Merge 813cdcacde6cbf5907dbab2275cf31436f0121e1 into 6efd54301e87eff51…
smouillour Oct 19, 2023
46de8a2
chore: pnpm-deduplicate
github-actions[bot] Oct 19, 2023
1c97306
Merge with master and manage conflict
Oct 19, 2023
27f728b
fixes after merge
Oct 19, 2023
fc54ed1
Sync with master
Oct 23, 2023
385f14d
update pnpm lock
Oct 23, 2023
74eae57
Merge 385f14dabe1b3b9f2fbc6b05e81747ee2516c33f into 35263dfcb1c1b3028…
smouillour Oct 23, 2023
2e97a30
chore: pnpm-deduplicate
github-actions[bot] Oct 23, 2023
1906997
fix prettier
Oct 23, 2023
14add4a
add missing deps in scripts-config-storybook-lib
Oct 23, 2023
8c6fd49
Sync with master
Oct 23, 2023
4b5cbb3
fix tests impacted by fix with prettier
Oct 23, 2023
65d448a
add eslint to module-to-cdn
Oct 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/funny-hotels-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/scripts-config-react-webpack': patch
---

fix: remove deprecated cache-loader plugin
5 changes: 5 additions & 0 deletions .changeset/many-flies-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/scripts-config-jest': major
---

chore: remove enzyme
18 changes: 9 additions & 9 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ runs:
registry-url: 'https://registry.npmjs.org/'
scope: '@talend'

- name: Install yarn
- name: Install PNPM
shell: bash
run: npm i -g yarn
run: npm install -g [email protected]

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

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
id: yarn-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 }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-
13 changes: 13 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# How to run github action locally

Use the cli ACT: https://github.com/nektos/act

# How to run PR-TEST

```bash
act pull_request -j build -W .github/workflows/pr-test.yml
```

```bash
act --container-architecture linux/amd64 pull_request -j build -W .github/workflows/pr-test.yml
```
4 changes: 2 additions & 2 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
uses: ./.github/actions/setup-node

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 #v1.4.5
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: pnpm run release
commit: "chore: prepare release"
title: "chore: prepare release"
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:

- name: Upgrade dependencies
run: |
yarn --frozen-lockfile --ignore-scripts
yarn talend-upgrade-deps --ignore-scripts
yarn talend-upgrade-deps --scope=@talend --latest --ignore-scripts
yarn talend-upgrade-deps --latest --dry > dependencies-latest.txt
pnpm --frozen-lockfile --ignore-scripts
npx talend-upgrade-deps --ignore-scripts
npx talend-upgrade-deps --scope=@talend --latest --ignore-scripts
npx talend-upgrade-deps --latest --dry > dependencies-latest.txt
git add dependencies-latest.txt

- name: Create Pull Request
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/design-system-component-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ jobs:
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
path: ~/.cache/Cypress
key: my-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
key: my-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install dependencies
run: |
yarn --frozen-lock --ignore-scripts
yarn cypress install
yarn workspace @talend/assets-api run build:lib
yarn workspace @talend/utils run build:lib
yarn workspace @talend/icons run build:lib
yarn workspace @talend/design-tokens run build:lib
pnpm install --frozen-lockfile --ignore-scripts
pnpm cypress install
pnpm --filter @talend/assets-api run build:lib
pnpm --filter @talend/utils run build:lib
pnpm --filter @talend/icons run build:lib
pnpm --filter @talend/design-tokens run build:lib

- name: Cypress Component Testing
uses: cypress-io/github-action@59810ebfa5a5ac6fcfdcfdf036d1cd4d083a88f2 #v6.5.0
with:
install: false
browser: ${{ matrix.browser }}
command: yarn workspace @talend/design-system run test:cy
command: pnpm --filter @talend/design-system run test:cy

- name: Cypress screenshots upload
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/pr-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,24 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"

- name: cache for storybook
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
path: packages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
uses: ./.github/actions/setup-node

- name: Install
run: |
yarn install --frozen-lockfile
yarn global add surge
echo "$(yarn global bin)" >> $GITHUB_PATH
pnpm install --frozen-lockfile
pnpm add -g surge


- name: Build
run: |
yarn test:demo
pnpm run test:demo
./.github/workflows/before-surge.sh
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.STORYBOOK_FIGMA_ACCESS_TOKEN }}

- name: deploy if master
if: github.ref == 'refs/heads/master'
run: surge --project .static --domain "talend.surge.sh"
run: npx surge --project .static --domain "talend.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
Expand All @@ -74,7 +62,7 @@ jobs:
- name: deploy if PR
if: github.ref != 'refs/heads/master'
run: |
surge --project .static --domain "${{ github.event.number }}.talend.surge.sh"
npx surge --project .static --domain "${{ github.event.number }}.talend.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:
uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile --ignore-scripts

- name: eslint + stylelint
continue-on-error: true
id: eslint
run: yarn lint
run: pnpm lint

- name: Merge lint
run: yarn lint-merge-report master ${GITHUB_HEAD_REF}
run: pnpm lint-merge-report master ${GITHUB_HEAD_REF}

- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@5f4dc2e3af8d3c21b727edb597e5503510b1dc9c #v2.2.0
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/pr-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ jobs:
- name: Install and build playground
id: build
run: |
yarn install --frozen-lockfile
yarn global add surge
echo "$(yarn global bin)" >> $GITHUB_PATH
yarn pre-release
yarn workspace @talend/ui-playground run test:demo:umd
pnpm install --frozen-lockfile
pnpm add -g surge
pnpm pre-release
pnpm --filter @talend/ui-playground run test:demo:umd

- name: deploy if master
if: github.ref == 'refs/heads/master'
Expand All @@ -46,7 +45,7 @@ jobs:
mkdir .static
mkdir .static/playground
cp -R packages/playground/dist/* .static/playground
surge --project .static --domain "talend-playground.surge.sh"
npx surge --project .static --domain "talend-playground.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
Expand All @@ -58,7 +57,7 @@ jobs:
mkdir .static
mkdir .static/playground
cp -R packages/playground/dist/* .static/playground
surge --project .static --domain "${{ github.event.number }}.talend-playground.surge.sh"
npx surge --project .static --domain "${{ github.event.number }}.talend-playground.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
Expand All @@ -72,6 +71,9 @@ jobs:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Check UMD files size diff
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 #v2.5.0
if: github.ref != 'refs/heads/master'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Test
run: yarn 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
4 changes: 2 additions & 2 deletions .github/workflows/tests-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

- name: Install and tests
run: |
yarn --frozen-lockfile --ignore-scripts
yarn test:cron
pnpm --frozen-lockfile --ignore-scripts
pnpm test:cron

- name: Create Issue on Failed workflow
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ./.github/actions/setup-node

- name: Install dependencies
run: yarn --frozen-lock
run: pnpm install --frozen-lockfile

- name: Publish PR to DS Chromatic
if: github.ref != 'refs/heads/master'
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/yarn-deduplicate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: yarn-deduplicate
name: pnpm-deduplicate

on:
pull_request:
paths:
- "yarn.lock"
- "pnpm-lock.yaml"

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
Expand Down Expand Up @@ -31,17 +31,16 @@ jobs:
- name: Use Node.js
uses: ./.github/actions/setup-node

- name: yarn-deduplicate
- name: pnpm-deduplicate
id: deduplicate
run: |
yarn
yarn yarn-deduplicate
echo "::set-output name=diff::$(git status --short yarn.lock)"
pnpm dedupe --ignore-scripts
echo "::set-output name=diff::$(git status --short pnpm-lock.yaml)"

- name: Commit dedupe
if: steps.deduplicate.outputs.diff
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "chore: yarn-deduplicate"
message: "chore: pnpm-deduplicate"
branch: ${{ github.head_ref }}
41 changes: 41 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
prefer-workspace-packages=true

#https://pnpm.io/blog/2020/10/17/node-modules-configuration-options-with-pnpm#plugnplay-the-strictest-configuration
hoist=false

#########################################
# WARNGING Add public-hoist-pattern ONLY if you don't have other solution
#########################################
# ES LINT
public-hoist-pattern[]=eslint-plugin-angular
public-hoist-pattern[]=eslint-plugin-cypress
public-hoist-pattern[]=eslint-plugin-import
public-hoist-pattern[]=eslint-plugin-jest-dom
public-hoist-pattern[]=eslint-plugin-jsx-a11y
public-hoist-pattern[]=eslint-plugin-mdx
public-hoist-pattern[]=eslint-plugin-prettier
public-hoist-pattern[]=eslint-plugin-react
public-hoist-pattern[]=eslint-plugin-react-hooks
public-hoist-pattern[]=eslint-plugin-storybook
public-hoist-pattern[]=eslint-plugin-testing-library

# STYLE LINT
public-hoist-pattern[]=postcss-scss
public-hoist-pattern[]=stylelint-config-sass-guidelines

# JEST
public-hoist-pattern[]=jest-environment-jsdom
public-hoist-pattern[]=jest-environment-jsdom-global
public-hoist-pattern[]=jest-serializer-html

# I18N
public-hoist-pattern[]=i18next
public-hoist-pattern[]=react-i18next

# OTHERS
public-hoist-pattern[]=autoprefixer
public-hoist-pattern[]=redux*
public-hoist-pattern[]=reakit

public-hoist-pattern[]=*types*

3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodejs 20.8.1
# asdf plugin-add pnpm
pnpm 8.9.2
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"prettier.configPath": ".prettierrc.js",
"eslint.workingDirectories": [
{
"pattern": "packages/**"
Expand Down
1 change: 1 addition & 0 deletions fork/dynamic-cdn-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"dependencies": {
"@talend/module-to-cdn": "^9.9.1",
"read-pkg-up": "^7.0.1",
"semver": "^7.5.4",
"webpack-sources": "^3.2.3"
},
"peerDependencies": {
Expand Down
Loading
Loading