Repository navigation
fix: import ESM packages without a default export - #657
Merged
Merged
Conversation
Node 24 rejects default imports of @actions/core and js-yaml, so the scheduled ministry and crawler jobs exit before they run.
There was a problem hiding this comment.
🟢 Approval recommended
Both targeted import corrections match the packages’ named-export APIs without changing runtime behavior.
0 open findings
What changed in this PR
Fixes Node 24 startup failures in scheduled schema and crawler jobs by using valid ESM namespace imports.
Changes:
- Corrects the
@actions/coreimport. - Corrects the
js-yamlimport while preserving existing call sites.
| File | Description |
|---|---|
schema/script/index.js |
Uses a namespace import for @actions/core. |
crawler/src/main.js |
Uses a namespace import for js-yaml. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
mishraomp
approved these changes
Oct 8, 2026
mishraomp
left a comment
Collaborator
There was a problem hiding this comment.
nice eye, thanks for fixing it, you are rocking it 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scheduled ministry and crawler jobs crash on startup because Node 24 rejects default imports of packages that have no default export.
Description
schema/script/index.jsimported@actions/core3.0.1 as a default export, andcrawler/src/main.jsdid the same withjs-yaml5.4.1. Both packages are ESM with named exports only. The scheduled workflow onmainexits inProcess scriptwithdoes not provide an export named 'default'(run 37707107595, and the Oct 7 run before it).Namespace imports keep the existing call sites (
core.setOutput,jsYaml.load).The soft-delete job in that same run failed separately:
oc logintoapi.silver.devops.gov.bc.ca:6443timed out. That job succeeded on Oct 7, and the crawler job logged in during the failing run. This PR does not change that login.Fixes # (issue)
Type of change
How Has This Been Tested?
import * as core from "@actions/core"andtypeof core.setOutput === "function"import * as jsYaml from "js-yaml"andtypeof jsYaml.load === "function"Checklist
Further comments
No new dependencies. The soft-delete cluster timeout is a separate, intermittent dial failure and is left alone.
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: