Skip to content

Commit d67be24

Browse files
committed
Break source code into modules
1 parent c37a56b commit d67be24

25 files changed

+2378
-354
lines changed

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,4 @@ out
121121
.clinic/
122122

123123
tags
124-
tags.*
125-
126-
schedule.etag
127-
schedule.json
128-
security.etag
129-
security.json
124+
tags.*

action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const core = require('@actions/core')
2-
const { isNodeVulnerable } = require('./index')
2+
const { isNodeVulnerable } = require('./src/index')
33

44
async function run () {
55
// Inputs

eol-versions.js

Lines changed: 0 additions & 125 deletions
This file was deleted.

is-vulnerable.js

Lines changed: 0 additions & 213 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "package that checks if your Node.js installation is vulnerable to known security vulnerabilities",
55
"main": "index.js",
66
"bin": {
7-
"is-my-node-vulnerable": "./index.js"
7+
"is-my-node-vulnerable": "./src/index.js"
88
},
99
"keywords": [
1010
"security",

setup-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const isOldEnough = require('./eol-versions')
1+
const isNodeEOL = require('./src/is-node-eol')
22
const assert = require('assert')
33

44
// When old enough an error is thrown
5-
if (isOldEnough(process.version)) {
5+
if (isNodeEOL(process.version)) {
66
runCompatibilityTest()
77
} else {
88
require('./test')
@@ -11,7 +11,7 @@ if (isOldEnough(process.version)) {
1111
function runCompatibilityTest () {
1212
const childProcess = require('child_process')
1313
const path = require('path')
14-
const isNodeVulnerablePath = path.resolve('./index.js')
14+
const isNodeVulnerablePath = path.resolve('./src/index.js')
1515
const child = childProcess.spawnSync(process.execPath, [isNodeVulnerablePath])
1616
assert.strictEqual(child.status, 1)
1717
assert(child.stdout.toString().indexOf('is end-of-life. There are high chances of being vulnerable') !== -1)

ascii.js renamed to src/ascii.js

File renamed without changes.

src/cache/schedule.etag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"f333f2f1aaaec1ea47b3107fd989b1e1a736a46106a5910fc2f8672a01ba6754"

0 commit comments

Comments
 (0)