chore: update @actions/core to v3 and convert to ESM
All checks were successful
Lint / pre-commit Linting (push) Successful in 31s
Test / Run Tests (push) Successful in 39s

This commit updates the @actions/core dependency from v2 to v3.
The primary change in @actions/core v3 is that it is now an ESM-only package.
To maintain compatibility, the following changes were made:
- Added "type": "module" to package.json to switch the project to ESM.
- Converted index.js from CommonJS to ESM, replacing require with import/export.
- Converted __tests__/index.test.js to ESM to support testing the updated index.js.
- Re-built the production bundle in dist/ using ncc to reflect the changes.
- Updated the main entry point check in index.js to use import.meta.url for ESM compatibility.

This ensures the action continues to function correctly with the latest GitHub Actions toolkit library.
This commit is contained in:
2026-02-23 00:46:48 +00:00
parent cbbd0e64e8
commit cebff45aa7
6 changed files with 46 additions and 47 deletions

View File

@@ -2,6 +2,7 @@
"name": "screeps-deploy-action",
"version": "0.1.1",
"description": "Deploys screeps code to the official game or an pirvate server.",
"type": "module",
"main": "index.js",
"scripts": {
"start": "node index.js",
@@ -9,7 +10,7 @@
"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
},
"dependencies": {
"@actions/core": "^2.0.0",
"@actions/core": "^3.0.0",
"glob": "^13.0.0",
"screeps-api": "^1.7.2"
},