feat(core): drop support for Node.js 12 (#45286)

Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.

BREAKING CHANGE:

Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.

PR Close #45286
This commit is contained in:
Alan Agius
2022-03-07 16:43:13 +01:00
committed by Andrew Kushnir
parent f58b8a94d4
commit 6eaaefd22e
29 changed files with 33 additions and 54 deletions
@@ -11,9 +11,6 @@ import '@angular/compiler';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/animations';
describe('treeshaking with uglify', () => {
@@ -22,7 +19,7 @@ describe('treeshaking with uglify', () => {
// always pass)
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {
@@ -12,16 +12,13 @@ import {withBody} from '@angular/private/testing';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/cyclic_import';
describe('treeshaking with uglify', () => {
let content: string;
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
describe('functional test in domino', () => {
@@ -11,9 +11,6 @@ import '@angular/compiler';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/forms_reactive';
describe('treeshaking with uglify', () => {
@@ -22,7 +19,7 @@ describe('treeshaking with uglify', () => {
// always pass)
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {
@@ -11,9 +11,6 @@ import '@angular/compiler';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/forms_template_driven';
describe('treeshaking with uglify', () => {
@@ -22,7 +19,7 @@ describe('treeshaking with uglify', () => {
// always pass)
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {
@@ -12,16 +12,13 @@ import {withBody} from '@angular/private/testing';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/hello_world';
describe('treeshaking with uglify', () => {
let content: string;
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {
@@ -11,16 +11,13 @@ import '@angular/compiler';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/hello_world_r2';
describe('treeshaking with uglify', () => {
let content: string;
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {
@@ -11,9 +11,6 @@ import '@angular/compiler';
import * as fs from 'fs';
import * as path from 'path';
const UTF8 = {
encoding: 'utf-8'
};
const PACKAGE = 'angular/packages/core/test/bundling/router';
describe('treeshaking with uglify', () => {
@@ -22,7 +19,7 @@ describe('treeshaking with uglify', () => {
// always pass)
const contentPath = require.resolve(path.join(PACKAGE, 'bundle.debug.min.js'));
beforeAll(() => {
content = fs.readFileSync(contentPath, UTF8);
content = fs.readFileSync(contentPath, {encoding: 'utf-8'});
});
it('should drop unused TypeScript helpers', () => {