Skip to content

Commit f6b3a9f

Browse files
authored
ci: no bundling (#1610)
1 parent a9983f7 commit f6b3a9f

File tree

11 files changed

+24
-245
lines changed

11 files changed

+24
-245
lines changed

.github/workflows/onRelease.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,3 @@ jobs:
2929
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
3030

3131
secrets: inherit
32-
33-
publish-bundle:
34-
if: ${{ success() && needs.getDistTag.outputs.tag == '' }}
35-
uses: ./.github/workflows/releaseWithCoreBundle.yml
36-
needs: [getDistTag, npm]
37-
with:
38-
branch: 'main'
39-
secrets: inherit

.github/workflows/releaseWithCoreBundle.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@ jobs:
1616
windows-unit-tests:
1717
needs: linux-unit-tests
1818
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
19-
test-bundle:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
- uses: actions/setup-node@v4
24-
with:
25-
node-version: lts/*
26-
cache: yarn
27-
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
28-
- name: Build the project
29-
run: yarn build
30-
- name: check if bundling runs into failures
31-
run: node scripts/testEsbuild.js
3219

3320
nuts:
3421
needs: linux-unit-tests

.github/workflows/testWithCoreBundle.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.husky/pre-commit

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

4-
yarn lint && yarn pretty-quick --staged
5-
node ./scripts/scanTs.js
4+
yarn lint && yarn pretty-quick --staged

.vscode/snippets.code-snippets

Lines changed: 0 additions & 30 deletions
This file was deleted.

package.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
"mocha": "^11.7.1",
5656
"mocha-junit-reporter": "^1.23.3",
5757
"mocha-snap": "^5.0.0",
58-
"ts-morph": "^24.0.0",
5958
"ts-node": "^10.9.2",
6059
"ts-patch": "^3.3.0",
6160
"typescript": "^5.5.4"
@@ -141,6 +140,19 @@
141140
],
142141
"output": []
143142
},
143+
"test:bundle": {
144+
"dependencies": [
145+
"compile"
146+
],
147+
"command": "node scripts/esbuild.config.mjs",
148+
"files": [
149+
"lib/src",
150+
"scripts/esbuild.config.mjs"
151+
],
152+
"output": [
153+
"dist"
154+
]
155+
},
144156
"test:compile": {
145157
"command": "tsc -p \"./test\" --pretty",
146158
"files": [
@@ -154,7 +166,8 @@
154166
"test:only",
155167
"test:compile",
156168
"test:registry-validation",
157-
"test:snapshot"
169+
"test:snapshot",
170+
"test:bundle"
158171
]
159172
},
160173
"test:registry-validation": {

scripts/esbuild.config.js renamed to scripts/esbuild.config.mjs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,19 @@
33
* sdr is bundled directly in salesforcedx-vscode
44
* The file is only used to detect any potential risks to esbuild.
55
**/
6-
const { build } = require('esbuild');
6+
import { build } from 'esbuild';
77

8-
const sharedConfig = {
8+
await build({
99
bundle: true,
1010
format: 'cjs',
1111
platform: 'node',
12-
external: [], // The allowlist of dependencies that are not bundle-able
1312
keepNames: true,
14-
plugins: [],
1513
supported: {
1614
'dynamic-import': false,
1715
},
1816
logOverride: {
1917
'unsupported-dynamic-import': 'error',
2018
},
21-
};
22-
23-
(async () => {
24-
await build({
25-
...sharedConfig,
26-
entryPoints: ['./lib/src/index.js'],
27-
outdir: 'dist',
28-
});
29-
})();
19+
entryPoints: ['./lib/src/index.js'],
20+
outdir: 'dist',
21+
});

scripts/scanTs.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

scripts/testEsbuild.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)