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

Mz/bundle test cover #1146

Merged
merged 10 commits into from
Oct 3, 2024
Merged
9 changes: 2 additions & 7 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,12 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Install esbuild Dependencies
Copy link
Member Author

Choose a reason for hiding this comment

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

I specify these dev dependencies in package.json, so I removed this step in the workflow.

run: |
yarn add -D esbuild@^0.19.5 esbuild-plugin-pino@^2.1.0 npm-dts@^1.3.12 esbuild-plugin-tsc@^0.4.0
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Update for Bundling
run: |
node scripts/updateForBundling.js
- name: Generate Bundle
- name: Generate Bundle and Check if there is any dependency that needs to be externalized and is not in the whitelist.
Copy link
Member Author

Choose a reason for hiding this comment

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

I used this script to bundle to detect if there is any dependencies that should be externalized.

run: |
yarn build
node scripts/build.js
node scripts/bundleWithCheck.js
- name: Post Bundling Update
run: |
node scripts/postBundlingUpdate.js
4 changes: 0 additions & 4 deletions .github/workflows/esbuild-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Install esbuild Dependencies
run: |
yarn add -D esbuild@^0.19.5 esbuild-plugin-pino@^2.1.0 npm-dts@^1.3.12 esbuild-plugin-tsc@^0.4.0
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Update for Bundling
run: |
node scripts/updateForBundling.js
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the node version to the latest because originally it uses node v18 which is not compatible with the dev dependency, npm-dts, which I just added

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the minimum supported node version for sfdx-core? Is there a way to not change nodejs version?

node-version: lts/*
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
with:
ignore-scripts: true
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/testExternalProjects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
- name: Add dependencies to bundle node_modules
run: |
yarn install --network-timeout 600000
yarn add -D esbuild@^0.19.5 esbuild-plugin-pino@^2.1.0 npm-dts@^1.3.12 esbuild-plugin-tsc@^0.4.0
working-directory: node_modules/@salesforce/core
- name: Update for bundling
run: node scripts/updateForBundling.js
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

yarn lint && yarn pretty-quick --staged
node ./scripts/scanTs.js
Copy link
Member Author

@mingxuanzhangsfdx mingxuanzhangsfdx Oct 2, 2024

Choose a reason for hiding this comment

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

I added this extra step to scan all ts artifacts to list usages of fs.read*

Loading
Loading