-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,786 additions
and
1,651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"jest": true, | ||
"jasmine": true | ||
"es6": true | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], | ||
"rules": { | ||
"no-console": 0 | ||
}, | ||
"extends": "eslint:recommended" | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
"no-console": 0, | ||
"no-var": "error", | ||
"strict": [2, "never"], | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
node_modules | ||
coverage | ||
.history | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export NVM_DIR="$HOME/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
tag-version-prefix= | ||
save-prefix= | ||
save-prefix="" | ||
save-exact = true | ||
tag-version-prefix="" | ||
strict-peer-dependencies = false | ||
auto-install-peers = true | ||
lockfile = true | ||
enable-pre-post-scripts = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14.21.1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/*! | ||
* node-version | ||
* Copyright(c) 2011-2023 Rodolphe Stoclin | ||
* MIT Licensed | ||
*/ | ||
|
||
import { describe, expect, test } from 'vitest'; | ||
import nodeVersion from '../src'; | ||
|
||
const TARGET_NODE_MAJOR = '14'; | ||
const TARGET_NODE_MINOR = '21'; | ||
const TARGET_NODE_PATCH = '1'; | ||
|
||
describe('node-version', () => { | ||
test('should be ok', () => { | ||
expect(nodeVersion).toBeTruthy(); | ||
}); | ||
|
||
test('should have original property', () => { | ||
expect(nodeVersion).toHaveProperty('original'); | ||
}); | ||
|
||
test('original value should be ok', () => { | ||
expect(nodeVersion.original).toBe(`v${TARGET_NODE_MAJOR}.${TARGET_NODE_MINOR}.${TARGET_NODE_PATCH}`); | ||
}); | ||
|
||
test('should have short property', () => { | ||
expect(nodeVersion).toHaveProperty('short'); | ||
}); | ||
|
||
test('short value should be ok', () => { | ||
expect(nodeVersion.short).toBe(`${TARGET_NODE_MAJOR}.${TARGET_NODE_MINOR}`); | ||
}); | ||
|
||
test('should have long property', () => { | ||
expect(nodeVersion).toHaveProperty('long'); | ||
}); | ||
|
||
test('long value should be ok', () => { | ||
expect(nodeVersion.long).toBe(`${TARGET_NODE_MAJOR}.${TARGET_NODE_MINOR}.${TARGET_NODE_PATCH}`); | ||
}); | ||
|
||
test('should have major property', () => { | ||
expect(nodeVersion).toHaveProperty('major'); | ||
}); | ||
|
||
test('major value should be ok', () => { | ||
expect(nodeVersion.major).toBe(TARGET_NODE_MAJOR); | ||
}); | ||
|
||
test('should have minor property', () => { | ||
expect(nodeVersion).toHaveProperty('minor'); | ||
}); | ||
|
||
test('minor value should be ok', () => { | ||
expect(nodeVersion.minor).toBe(TARGET_NODE_MINOR); | ||
}); | ||
|
||
test('should have build property', () => { | ||
expect(nodeVersion).toHaveProperty('build'); | ||
}); | ||
|
||
test('build value should be ok', () => { | ||
expect(nodeVersion.build).toBe(TARGET_NODE_PATCH); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.