-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Code will fail to run in Node 22 LTS with the following error:
import WorkflowSchema from "../workflow-v1.0.json" assert { type: "json" };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:340:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
at #translate (node:internal/modules/esm/loader:433:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)
Node.js v22.11.0
This is the relevant line in the source:
import WorkflowSchema from "../workflow-v1.0.json" assert {type: "json"}; |
Package/Area
- Expressions
- Workflow Parser
- Language Service
- Language Server
Package Version
@actions/[email protected]
Additional context
This is related to Node dropping support for the non-standard assert syntax (see nodejs/node#52104)
I only checked with Workflow Parser but a search shows it will also impact Language Service
import descriptions from "./descriptions.json" assert {type: "json"}; |
languageservices/languageservice/src/context-providers/events/eventPayloads.ts
Lines 7 to 8 in 3a8c29c
import workflow_call from "./workflow_call.json" assert {type: "json"}; | |
import schemaImport from "rest-api-description/descriptions/api.github.com/dereferenced/api.github.com.deref.json" assert {type: "json"}; |
kraenhansen
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working