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

Revert "Add lts version" #18

Merged
merged 1 commit into from
Jul 30, 2019
Merged
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
16 changes: 0 additions & 16 deletions lib/installer.js
Original file line number Diff line number Diff line change
@@ -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
16 changes: 0 additions & 16 deletions src/installer.ts
Original file line number Diff line number Diff line change
@@ -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;