diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e914cda --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + versioning-strategy: "increase" diff --git a/index.js b/index.js index 4fbad8b..468caf5 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +const path = require("path"); const core = require("@actions/core"); main(); @@ -6,15 +7,15 @@ async function main() { const cwd = core.getInput("cwd"); try { + const args = []; if (cwd) { - core.debug(`cwd input is set to "${cwd}". Changing working directory`); - process.chdir(cwd); - core.info(`working directory is ${process.cwd()}`); + core.info(`Setting working directory to ${path.resolve(cwd)}`); + args.push("--cwd", path.resolve(cwd)); } const cli = require("@skypack/package-check"); const run = cli.run || cli.cli || cli.default; - await run(); + await run(args); } catch (error) { core.error(error); core.setFailed(error.message); diff --git a/package-lock.json b/package-lock.json index aa5ce79..ccb2890 100644 --- a/package-lock.json +++ b/package-lock.json @@ -315,11 +315,19 @@ } }, "@skypack/package-check": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@skypack/package-check/-/package-check-0.1.0.tgz", - "integrity": "sha512-MouyPN2ewOADpBw01HWi6+bo0PmrTPCttyCUBFkT5UAHgQFjJ0AFIVYa4O3cVZCmGkrtA7YksJ7dOG9U9Hz3xA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@skypack/package-check/-/package-check-0.2.2.tgz", + "integrity": "sha512-T4Wyi9lUuz0a1C2OHuzqZ0aFOCI0AmaGTb2LP9sHgWdoHXlB3JU02gfBpa0Y081G/gFsJYpQ/R0iCJRzF/nknw==", "requires": { - "kleur": "^4.1.3" + "kleur": "^4.1.3", + "yargs-parser": "^20.2.3" + }, + "dependencies": { + "yargs-parser": { + "version": "20.2.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.3.tgz", + "integrity": "sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww==" + } } }, "@tootallnate/once": { diff --git a/package.json b/package.json index 06e9f4f..95ccc30 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "license": "ISC", "dependencies": { "@actions/core": "^1.2.4", - "@skypack/package-check": "^0.1.0" + "@skypack/package-check": "0.2.2" }, "devDependencies": { "@semantic-release/git": "^9.0.0",