Skip to content

Commit fca6b47

Browse files
Upgrade @mendix/pluggable-widgets-tools to v10.21.1 (#277)
2 parents 7ceda10 + 9133ffd commit fca6b47

File tree

126 files changed

+17512
-19919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+17512
-19919
lines changed

.github/workflows/Build.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,27 @@ jobs:
3535
- name: "Fetching main to compare"
3636
if: github.event_name == 'pull_request' && steps.files.outputs.global_files == ''
3737
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
38-
- name: "Defining environment variables"
39-
if: startsWith(matrix.os, 'ubuntu')
40-
id: variablesLinux
41-
run: echo "arg=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '--since'; else echo '--all'; fi)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
42-
- name: "Defining environment variables"
43-
if: startsWith(matrix.os, 'windows')
44-
id: variablesWindows
45-
run: echo "arg=$(If ('${{ steps.files.outputs.global_files }}' -eq '' -AND '${{ github.event_name == 'pull_request' }}' -eq 'true'){ echo '--since' } Else { echo '--all' })" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
4638
- name: "Defining node version"
4739
uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4
4840
with:
4941
node-version-file: ".nvmrc"
50-
cache: "yarn"
42+
- name: "Setup pnpm"
43+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
44+
- name: "Get pnpm store directory"
45+
id: pnpm-cache
46+
shell: bash
47+
run: |
48+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
49+
- name: "Setup cache"
50+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
51+
with:
52+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
53+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
54+
restore-keys: |
55+
${{ runner.os }}-pnpm-store-
5156
- name: "Installing dependencies"
52-
run: yarn install
57+
run: pnpm install
5358
- name: "Running build for development"
54-
run: yarn workspaces foreach ${{ steps.variablesLinux.outputs.arg }} ${{ steps.variablesWindows.outputs.arg }} --parallel run build
59+
run: pnpm -r --filter=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '...[origin/main]'; else echo '**'; fi) run build
5560
env:
5661
NODE_OPTIONS: --max_old_space_size=8192

.github/workflows/MarketplaceRelease.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,22 @@ jobs:
2828
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
2929
with:
3030
node-version-file: ".nvmrc"
31+
- name: "Setup pnpm"
32+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
3133
- name: "Installing dependencies"
32-
run: yarn install
34+
run: pnpm install
3335
- name: "Building native widgets and js actions"
34-
run: yarn workspaces foreach --all run release
36+
run: pnpm -r run release
3537
- name: "Updating Native Mobile Resources project"
36-
run: yarn workspaces foreach --all run create-modules
38+
run: pnpm -r run create-modules
3739
env:
3840
GH_USERNAME: ${{ secrets.GH_USERNAME }}
3941
GH_EMAIL: ${{ secrets.GH_EMAIL }}
4042
GH_NAME: ${{ secrets.GH_NAME }}
4143
GH_PAT: ${{ secrets.GH_PAT }}
4244
TAG: ${{ steps.variables.outputs.tag }}
4345
- name: "Check changes and publish package ${{ steps.variables.outputs.tag }}"
44-
run: yarn workspace ${{ steps.scope.outputs._0 }} run release:marketplace
46+
run: pnpm --filter=${{ steps.scope.outputs._0 }} run release:marketplace
4547
env:
4648
OPENID_URL: ${{ secrets.OPENID_URL }}
4749
CPAPI_USERNAME: ${{ secrets.CPAPI_USERNAME }}

.github/workflows/NativePipeline.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,18 @@ jobs:
192192
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
193193
with:
194194
node-version-file: .nvmrc
195-
cache: yarn
195+
- name: "Setup pnpm"
196+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
196197
- name: "Install dependencies"
197-
run: yarn install --immutable
198+
run: pnpm install --frozen-lockfile
198199
- name: "Force rebuild resources"
199200
run: |
200201
# Build JS actions if needed
201202
if [ "${{ github.event.inputs.workspace }}" = "js-actions" ] || \
202203
[ "${{ github.event.inputs.workspace }}" = "*-native" ] || \
203204
[ "${{ github.event_name }}" = "schedule" ]; then
204-
yarn workspace mobile-resources-native run build
205-
yarn workspace nanoflow-actions-native run build
205+
pnpm --filter=mobile-resources-native run build
206+
pnpm --filter=nanoflow-actions-native run build
206207
fi
207208
208209
# Build widgets if needed (any specific widget, *-native, or nightly)
@@ -211,11 +212,11 @@ jobs:
211212
[ "${{ github.event_name }}" = "schedule" ]; then
212213
widgets=$(echo '${{ needs.scope.outputs.widgets }}' | jq -r '.[]')
213214
for w in $widgets; do
214-
yarn workspace $w run build
215+
pnpm --filter=$w run build
215216
done
216217
fi
217218
- name: "Unit test"
218-
run: yarn workspaces foreach ${{ needs.scope.outputs.scope }} run test
219+
run: pnpm -r --filter="${{ needs.scope.outputs.scope }}" run test
219220
- name: "Upload JS actions resources artifact"
220221
if: ${{ github.event.inputs.workspace == 'js-actions' }}
221222
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #v4
@@ -478,9 +479,10 @@ jobs:
478479
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
479480
with:
480481
node-version-file: .nvmrc
481-
cache: yarn
482+
- name: "Setup pnpm"
483+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
482484
- name: "Install dependencies"
483-
run: yarn install --immutable
485+
run: pnpm install --frozen-lockfile
484486
- name: "Download project MDA file"
485487
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
486488
with:
@@ -599,11 +601,10 @@ jobs:
599601
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
600602
with:
601603
node-version-file: .nvmrc
602-
cache: yarn
604+
- name: "Setup pnpm"
605+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
603606
- name: "Install dependencies"
604-
run: |
605-
yarn cache clean
606-
yarn install --immutable
607+
run: pnpm install --frozen-lockfile
607608
- name: "Download project MDA file"
608609
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
609610
with:
@@ -712,9 +713,10 @@ jobs:
712713
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
713714
with:
714715
node-version-file: .nvmrc
715-
cache: yarn
716+
- name: "Setup pnpm"
717+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
716718
- name: "Install dependencies"
717-
run: yarn install --immutable
719+
run: pnpm install --frozen-lockfile
718720
- name: "Download project MDA file"
719721
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
720722
with:
@@ -796,11 +798,10 @@ jobs:
796798
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
797799
with:
798800
node-version-file: .nvmrc
799-
cache: yarn
801+
- name: "Setup pnpm"
802+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
800803
- name: "Install dependencies"
801-
run: |
802-
yarn cache clean
803-
yarn install --immutable
804+
run: pnpm install --frozen-lockfile
804805
- name: "Download project MDA file"
805806
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
806807
with:
@@ -908,10 +909,11 @@ jobs:
908909
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
909910
with:
910911
node-version-file: .nvmrc
911-
cache: yarn
912+
- name: "Setup pnpm"
913+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
912914

913915
- name: "Install dependencies"
914-
run: yarn install
916+
run: pnpm install --frozen-lockfile
915917

916918
- name: "Compare Android screenshots"
917919
continue-on-error: true

.github/workflows/Release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,23 @@ jobs:
4444
uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4
4545
with:
4646
node-version-file: ".nvmrc"
47-
cache: "yarn"
47+
- name: "Setup pnpm"
48+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
49+
- name: "Get pnpm store directory"
50+
id: pnpm-cache
51+
shell: bash
52+
run: |
53+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
54+
- name: "Setup cache"
55+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
56+
with:
57+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
58+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
59+
restore-keys: |
60+
${{ runner.os }}-pnpm-store-
4861
- name: "Installing dependencies"
49-
run: yarn install
62+
run: pnpm install
5063
- name: "Running release for production"
51-
run: yarn workspaces foreach ${{ steps.variablesLinux.outputs.arg }} ${{ steps.variablesWindows.outputs.arg }} --parallel run release
64+
run: pnpm -r --filter=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '...[origin/main]'; else echo '**'; fi) run release
5265
env:
5366
NODE_OPTIONS: --max_old_space_size=8192

.github/workflows/UnitTests.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,30 @@ jobs:
3131
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
3232
- name: "Defining environment variables"
3333
id: variables
34-
run: echo "arg=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '--since'; else echo '--all'; fi)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
34+
run: echo "arg=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '...[origin/main]'; else echo '**'; fi)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
3535
- name: "Defining node version"
3636
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
3737
with:
3838
node-version-file: ".nvmrc"
39-
cache: "yarn"
40-
- name: "Get yarn cache directory path"
41-
id: yarn-cache-dir-path
42-
run: echo "dir=$(yarn config get cacheFolder)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_ENV' || '$GITHUB_ENV' }}
39+
- name: "Setup pnpm"
40+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
41+
- name: "Get pnpm store directory"
42+
id: pnpm-cache
43+
shell: bash
44+
run: |
45+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
4346
- name: "Defining cache"
4447
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
4548
env:
4649
cache-name: cache-node-modules
4750
with:
48-
path: ${{ env.dir }}
49-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
51+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
52+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
53+
restore-keys: |
54+
${{ runner.os }}-pnpm-store-
5055
- name: "Installing dependencies"
51-
run: yarn install
56+
run: pnpm install
5257
- name: "Linting code"
53-
run: yarn workspaces foreach ${{ steps.variables.outputs.arg }} --parallel run lint
58+
run: pnpm -r --filter=${{ steps.variables.outputs.arg }} run lint
5459
- name: "Running unit tests"
55-
run: yarn workspaces foreach ${{ steps.variables.outputs.arg }} --parallel run test
60+
run: pnpm -r --filter=${{ steps.variables.outputs.arg }} run test

.gitignore

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ mendixProject
2020
**/tests/testProject
2121
**/pluggableWidgets/**/artifacts
2222

23-
.yarn/*
24-
!.yarn/patches
25-
!.yarn/plugins
26-
!.yarn/releases
27-
!.yarn/sdks
28-
!.yarn/versions
23+
.pnpm-debug.log*
24+
.pnpm-store
25+
.pnpmfile.cjs
26+
.pnpmfile.js
2927

3028
.java-version

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
yarn format && yarn validate-staged-widget-versions
4+
pnpm format && pnpm validate-staged-widget-versions

.npmrc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
1-
package-lock=false
2-
legacy-peer-deps=true
1+
# Enable strict peer dependencies
2+
strict-peer-dependencies=false
3+
4+
# Hoist patterns to avoid module resolution issues
5+
public-hoist-pattern[]=*eslint*
6+
public-hoist-pattern[]=*prettier*
7+
public-hoist-pattern[]=*rollup*
8+
public-hoist-pattern[]=*jest*
9+
public-hoist-pattern[]=*react-native*
10+
public-hoist-pattern[]=@types/*
11+
12+
# Use hard links when possible
13+
link-workspace-packages=true
14+
prefer-workspace-packages=true
15+
16+
# Enable shamefully-hoist for compatibility
17+
shamefully-hoist=true
18+
19+
# Enable workspace features
20+
shared-workspace-lockfile=true

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
.idea
66
.husky
77
.vscode
8+
pnpm-lock.yaml

0 commit comments

Comments
 (0)