This PR updates the `@actions/core` dependency from v2 to v3.0.0.
### Major Changes:
- **Dependency Update**: Updated `@actions/core` to `v3.0.0` in `package.json`.
- **ESM Migration**: Converted the entire project to ECMAScript Modules (ESM). This was necessary because `@actions/core` v3 is an ESM-only package and does not provide CommonJS exports.
- **`package.json` updates**: Added `"type": "module"` and updated the dependency version.
- **Code Refactor**:
- Converted `index.js` to use `import` and `export`.
- Updated the main execution check to use `import.meta.url` for ESM compatibility.
- Converted `__tests__/index.test.js` to use ESM imports for compatibility with the updated source code.
- **Production Build**: Re-generated the `dist/index.js` bundle using `ncc` to reflect the changes.
- **Node.js Version**: The project continues to use Node 20 (`node20` in `action.yaml`), which is fully compatible with these changes.
### Why these changes are needed:
- `@actions/core` v3 brings latest improvements and fixes from the GitHub Actions toolkit.
- Migrating to ESM is the modern standard for Node.js development and is required to consume ESM-only packages like the new `@actions/core` v3.
Verified with `npm test` and `npm run build`.
Reviewed-on: #73
23 lines
603 B
JSON
23 lines
603 B
JSON
{
|
|
"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",
|
|
"test": "vitest run --globals --coverage",
|
|
"build": "ncc build index.js -o dist -m --external utf-8-validate --external bufferutil"
|
|
},
|
|
"dependencies": {
|
|
"@actions/core": "^3.0.0",
|
|
"glob": "^13.0.0",
|
|
"screeps-api": "^1.7.2"
|
|
},
|
|
"devDependencies": {
|
|
"@vercel/ncc": "^0.38.4",
|
|
"@vitest/coverage-v8": "^4.0.16",
|
|
"vitest": "^4.0.16"
|
|
}
|
|
}
|