豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 19e3093

Browse files
committed
fix(github-actions): improve error logging and fix ESM node resolution
We recently prioritized `module` over `main` but this results in browser code being prioritized sometimes. We revert that change and keep the original/default ESBuild main field order. This unveils an issue with `jsonc-parser` though- which ships an UMD file for `main` that cannot be bundled. We can work around this by processing `jsonc-parser`'s ESM output directly and then using that instead of leaving resolution to ESBuild for this package. There is an issue for this being tracked: microsoft/node-jsonc-parser#57
1 parent a67b584 commit 19e3093

File tree

21 files changed

+120365
-110196
lines changed

21 files changed

+120365
-110196
lines changed

.github/local-actions/changelog/main.js

Lines changed: 12277 additions & 10739 deletions
Large diffs are not rendered by default.

bazel/esbuild/index.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def esbuild_esm_bundle(name, **kwargs):
2929

3030
args = dict(
3131
resolveExtensions = [".mjs", ".js", ".json"],
32-
mainFields = ["module", "main"],
3332
outExtension = {".js": ".mjs"},
3433
# Workaround for: https://github.com/evanw/esbuild/issues/1921.
3534
banner = {

github-actions/commit-message-based-labels/lib/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CommitMessageBasedLabelManager {
9393
// to prevent the action from actually running in a fork of a repository with this action set up.
9494
if (context.repo.owner === 'angular') {
9595
CommitMessageBasedLabelManager.run().catch((e: Error) => {
96-
core.error(e);
96+
console.error(e);
9797
core.setFailed(e.message);
9898
});
9999
} else {

github-actions/commit-message-based-labels/main.js

Lines changed: 15890 additions & 14430 deletions
Large diffs are not rendered by default.

github-actions/create-pr-for-changes/lib/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async function main(): Promise<void> {
201201
}
202202
} catch (err: any) {
203203
core.setOutput('result', ActionResult.failed);
204-
core.error(err);
204+
console.error(err);
205205
core.setFailed(err.message);
206206
}
207207
}

github-actions/create-pr-for-changes/main.js

Lines changed: 6143 additions & 7455 deletions
Large diffs are not rendered by default.

github-actions/feature-request/main.js

Lines changed: 11917 additions & 10398 deletions
Large diffs are not rendered by default.

github-actions/google-internal-tests/lib/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ async function findExistingTestStatus(
9797
}
9898

9999
main().catch((e: Error) => {
100-
core.error(e);
100+
console.error(e);
101101
core.setFailed(e.message);
102102
});

github-actions/google-internal-tests/main.js

Lines changed: 6929 additions & 7580 deletions
Large diffs are not rendered by default.

github-actions/labels-sync/main.js

Lines changed: 11849 additions & 10330 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)