Skip to content

Commit

Permalink
Merge pull request #22 from joncloud/upgrade-deps
Browse files Browse the repository at this point in the history
Upgrades dependencies to latest stable
  • Loading branch information
joncloud authored Jun 25, 2022
2 parents 036c5a8 + d74b751 commit 05fcb06
Show file tree
Hide file tree
Showing 1,012 changed files with 118,427 additions and 244,183 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ 'windows-latest', 'ubuntu-20.04', 'macos-latest' ]
node-version: [12.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Newline-delimited list of paths to load plugins from. Default `""`.

```yml
- name: Create installer
uses: joncloud/makensis-action@v3.6
uses: joncloud/makensis-action@v3.7
with:
arguments: "/V3"
```
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
default: ''

runs:
using: 'node12'
using: 'node16'
main: 'index.js'

branding:
Expand Down
25 changes: 15 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const core = require('@actions/core');
'use strict';

const { getInput } = require('./input');
const { fail } = require('./output');
const { Installer } = require('./installer');

/**
Expand All @@ -22,20 +25,22 @@ const getBoolean = (value) => {
const run = async () => {
try {
const debugMode = getBoolean(process.env.debug);
const {
customArguments,
additionalPluginPaths,
scriptFile,
} = getInput();
const installer = new Installer(debugMode);
installer.setCustomArguments(core.getInput('arguments'));

core.getInput('additional-plugin-paths')
.split(/\n?\r/)
.map(pluginPath => pluginPath.trim())
.filter(pluginPath => !!pluginPath)
installer.setCustomArguments(customArguments);

additionalPluginPaths
.forEach(pluginPath => installer.addPluginPath(pluginPath.trim()));

await installer.createInstallerAsync(
core.getInput('script-file')
scriptFile
);
} catch (error) {
core.setFailed(error.message || 'Unexpected error occurred');
fail(error.message);
}
}

Expand Down
33 changes: 33 additions & 0 deletions input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';

const core = require('@actions/core');

/**
* @typedef {{
* customArguments: string,
* additionalPluginPaths: string[],
* scriptFile: string,
* }} Input
* @returns {Input}
*/
const getInput = () => {
const customArguments = getInput.core.getInput('arguments');

const additionalPluginPaths = getInput.core.getInput('additional-plugin-paths')
.split(/\n|\r/)
.map(pluginPath => pluginPath.trim())
.filter(pluginPath => !!pluginPath);

const scriptFile = getInput.core.getInput('script-file');

return {
customArguments,
additionalPluginPaths,
scriptFile,
}
};
getInput.core = core;

module.exports = {
getInput,
};
7 changes: 2 additions & 5 deletions node_modules/.bin/_mocha

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions node_modules/.bin/_mocha.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions node_modules/.bin/_mocha.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions node_modules/.bin/mocha

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions node_modules/.bin/mocha.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions node_modules/.bin/mocha.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions node_modules/.bin/nanoid.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions node_modules/.bin/nanoid.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions node_modules/.bin/semver

This file was deleted.

17 changes: 0 additions & 17 deletions node_modules/.bin/semver.cmd

This file was deleted.

18 changes: 0 additions & 18 deletions node_modules/.bin/semver.ps1

This file was deleted.

15 changes: 0 additions & 15 deletions node_modules/.bin/which

This file was deleted.

17 changes: 0 additions & 17 deletions node_modules/.bin/which.cmd

This file was deleted.

18 changes: 0 additions & 18 deletions node_modules/.bin/which.ps1

This file was deleted.

Loading

0 comments on commit 05fcb06

Please sign in to comment.