Revert "Add lts version (#17)" (#18)

This reverts commit 419dce7d3b.
This commit is contained in:
Danny McCormick 2019-07-29 20:45:12 -04:00 committed by GitHub
parent 374a5fddc3
commit 2a61dd5dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 32 deletions

View File

@ -44,9 +44,6 @@ if (!tempDirectory) {
}
function getNode(versionSpec) {
return __awaiter(this, void 0, void 0, function* () {
if (versionSpec.toLowerCase() === 'lts') {
versionSpec = getLtsVersion();
}
// check cache
let toolPath;
toolPath = tc.find('node', versionSpec);
@ -87,19 +84,6 @@ function getNode(versionSpec) {
});
}
exports.getNode = getNode;
// Schedule based off https://nodejs.org/en/about/releases/. TODO: would be nice to automate this so we don't drift
function getLtsVersion() {
const today = new Date();
if (today < new Date(2019, 9, 22)) {
return '10.x';
}
else if (today < new Date(2020, 9, 20)) {
return '12.x';
}
else {
return '14.x';
}
}
function queryLatestMatch(versionSpec) {
return __awaiter(this, void 0, void 0, function* () {
// node offers a json list of versions

View File

@ -36,10 +36,6 @@ interface INodeVersion {
}
export async function getNode(versionSpec: string) {
if (versionSpec.toLowerCase() === 'lts') {
versionSpec = getLtsVersion();
}
// check cache
let toolPath: string;
toolPath = tc.find('node', versionSpec);
@ -85,18 +81,6 @@ export async function getNode(versionSpec: string) {
core.addPath(toolPath);
}
// Schedule based off https://nodejs.org/en/about/releases/. TODO: would be nice to automate this so we don't drift
function getLtsVersion(): string {
const today = new Date();
if (today < new Date(2019, 9, 22)) {
return '10.x';
} else if (today < new Date(2020, 9, 20)) {
return '12.x';
} else {
return '14.x';
}
}
async function queryLatestMatch(versionSpec: string): Promise<string> {
// node offers a json list of versions
let dataFileName: string;