Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break source code into modules #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,4 @@ out
.clinic/

tags
tags.*

schedule.etag
schedule.json
security.etag
security.json
tags.*
2 changes: 1 addition & 1 deletion action.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const core = require('@actions/core')
const { isNodeVulnerable } = require('./index')
const { isNodeVulnerable } = require('./src/index')

async function run () {
// Inputs
Expand Down
125 changes: 0 additions & 125 deletions eol-versions.js

This file was deleted.

213 changes: 0 additions & 213 deletions is-vulnerable.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "package that checks if your Node.js installation is vulnerable to known security vulnerabilities",
"main": "index.js",
"bin": {
"is-my-node-vulnerable": "./index.js"
"is-my-node-vulnerable": "./src/index.js"
},
"keywords": [
"security",
Expand Down
6 changes: 3 additions & 3 deletions setup-test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const isOldEnough = require('./eol-versions')
const isNodeEOL = require('./src/is-node-eol')
const assert = require('assert')

// When old enough an error is thrown
if (isOldEnough(process.version)) {
if (isNodeEOL(process.version)) {
runCompatibilityTest()
} else {
require('./test')
Expand All @@ -11,7 +11,7 @@ if (isOldEnough(process.version)) {
function runCompatibilityTest () {
const childProcess = require('child_process')
const path = require('path')
const isNodeVulnerablePath = path.resolve('./index.js')
const isNodeVulnerablePath = path.resolve('./src/index.js')
const child = childProcess.spawnSync(process.execPath, [isNodeVulnerablePath])
assert.strictEqual(child.status, 1)
assert(child.stdout.toString().indexOf('is end-of-life. There are high chances of being vulnerable') !== -1)
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/cache/schedule.etag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"f333f2f1aaaec1ea47b3107fd989b1e1a736a46106a5910fc2f8672a01ba6754"
Loading
Loading