Commit Graph

12 Commits

Author SHA1 Message Date
eric sciple d2ffb50a92 Add language service support for action.yml files (#275)
- Add validation, completion, hover, and document links for action.yml files
- Implement document type detection to route action.yml to action-specific handlers
- Add expression context for composite actions (inputs, steps, github, runner, etc.)
- Add schema validation for required fields, branding, and composite step requirements
- Support JavaScript (node20/node24), Docker, and composite action types
- Validate action references in composite action uses steps
- Add JSDoc comments to parser and template functions
- Refactor hover to use hoverToken consistently
- Fix lint errors and add return type annotations
2026-01-02 10:38:52 -06:00
eric sciple 656a821a94 ESM migration: Add .js extensions for node16 moduleResolution (#257)
Migrate expressions, workflow-parser, and languageservice packages to use
proper ESM imports with .js extensions that work with node16 moduleResolution.

Changes:
- Update tsconfig.build.json in each package to use module: node16 and
  moduleResolution: node16
- Add .js extensions to all relative import paths (Option B approach)
- Fix yaml internal type imports in workflow-parser by defining local types
- Add skipLibCheck to handle @types/node compatibility issues
- Add TypeScript 5.8.3 override in root package.json
- Add ESM migration plan documentation

The languageserver package is deferred due to test hang issues that need
further investigation.

Related #154 - Upgrade moduleResolution from node to node16 or nodenext
Related #110 - Published ESM code has imports without file extensions
Related #64 - expressions: ERR_MODULE_NOT_FOUND attempting to run example
Related #146 - Can not import @actions/workflow-parser

Test results:
- expressions: 1068 tests passed
- workflow-parser: 292 tests passed
- languageservice: 452 tests passed

* docs: update ESM migration plan with findings

- Update languageserver blocker: vscode-languageserver v8.0.2 lacks ESM
  exports (not a test hang issue)
- Document that Option B (manual .js extensions) was chosen over Option A
  due to ts-jest compatibility issues
- Add workaround for yaml package internal types (LinePos, NodeBase)
- Update migration status table with accurate reason for deferral
- Add skipLibCheck note for @types/node compatibility
2025-12-18 13:35:48 -06:00
Christopher Schleiden b82ddcdb42 Update import paths
String replacement from `@github/actions-` to `@actions/`
2023-03-23 09:57:18 -07:00
Josh Gross 8e03b387a2 Cache transformed workflows separately 2023-03-21 15:52:25 -04:00
Josh Gross 8942a05502 Handle undefined templates in workflow template cache 2023-03-17 13:23:43 -04:00
Josh Gross 26f5eeede9 Lint the language service package 2023-03-15 16:52:56 -04:00
Josh Gross 2eb633fdf5 Fix caching for invalid YAML files 2023-03-14 11:43:28 -04:00
Jacob Wallraff b272ab29be Combine methods 2023-03-06 15:16:26 -08:00
Jacob Wallraff 6aaeefb9c2 Remove unused code and address feedback 2023-03-06 11:33:28 -08:00
Jacob Wallraff 2fc36cc6a1 Fix imports and format 2023-03-03 12:49:25 -08:00
Jacob Wallraff 5a199d4c52 Rename methods 2023-03-03 12:39:40 -08:00
Jacob Wallraff ffcd06c8c5 Move caching to language service 2023-03-03 12:28:29 -08:00