diff --git a/.circleci/config.yml b/.circleci/config.yml
index 67e6b474ec88..aa90ddd584b3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -17,9 +17,9 @@ orbs:
## IMPORTANT
# Windows needs its own cache key because binaries in node_modules are different.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
-var_1: &cache_key v1-angular_devkit-14.15-{{ checksum "yarn.lock" }}
+var_1: &cache_key v1-angular_devkit-14.17-{{ checksum "yarn.lock" }}
var_1_win: &cache_key_win v1-angular_devkit-win-12.22-{{ checksum "yarn.lock" }}
-var_3: &default_nodeversion '14.15'
+var_3: &default_nodeversion '14.17'
# Workspace initially persisted by the `setup` job, and then enhanced by `setup-and-build-win`.
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
@@ -338,6 +338,7 @@ workflows:
- setup
- e2e-cli:
name: e2e-cli
+ nodeversion: '14.15'
post-steps:
- store_artifacts:
path: /tmp/dist
diff --git a/.eslintrc.json b/.eslintrc.json
index 7b4d31e8b21a..954eb0855a7b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -93,6 +93,7 @@
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
+ "@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
diff --git a/.github/angular-robot.yml b/.github/angular-robot.yml
index e4a402d300b3..547c2f703422 100644
--- a/.github/angular-robot.yml
+++ b/.github/angular-robot.yml
@@ -31,14 +31,12 @@ merge:
# list of labels that a PR needs to have, checked with a regexp (e.g. "target:" will work for the label "target: major")
requiredLabels:
- 'target: *'
- - 'cla: yes'
# list of labels that a PR shouldn't have, checked after the required labels with a regexp
forbiddenLabels:
- 'action: cleanup'
- 'action: review'
- 'PR state: blocked'
- - 'cla: no'
# list of PR statuses that need to be successful
requiredStatuses:
@@ -51,7 +49,6 @@ merge:
- 'ci/circleci: e2e-cli'
- 'ci/circleci: test-browsers'
- 'ci/angular: size'
- - 'cla/google'
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
# {{MERGE_LABEL}} will be replaced by the value of the mergeLabel option
diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml
index 87ac8f08fa37..04143a4fd418 100644
--- a/.github/workflows/dev-infra.yml
+++ b/.github/workflows/dev-infra.yml
@@ -5,10 +5,10 @@ on:
types: [opened, synchronize, reopened]
jobs:
- breaking-changes-label:
+ labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: angular/dev-infra/github-actions/breaking-changes-label@792204aa7a4e88dab92636d34f5efb3546d69a9e
+ - uses: angular/dev-infra/github-actions/commit-message-based-labels@8d971668ff4da84baf14c9d0115c8f243fe83a32
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml
index 7904c0a00f4e..c017daa62b41 100644
--- a/.github/workflows/lock-closed.yml
+++ b/.github/workflows/lock-closed.yml
@@ -9,6 +9,6 @@ jobs:
lock_closed:
runs-on: ubuntu-latest
steps:
- - uses: angular/dev-infra/github-actions/lock-closed@792204aa7a4e88dab92636d34f5efb3546d69a9e
+ - uses: angular/dev-infra/github-actions/lock-closed@8d971668ff4da84baf14c9d0115c8f243fe83a32
with:
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
diff --git a/.yarn/releases/yarn-1.22.10.cjs b/.yarn/releases/yarn-1.22.17.cjs
similarity index 99%
rename from .yarn/releases/yarn-1.22.10.cjs
rename to .yarn/releases/yarn-1.22.17.cjs
index 68b1990b1d92..e25138d16386 100755
--- a/.yarn/releases/yarn-1.22.10.cjs
+++ b/.yarn/releases/yarn-1.22.17.cjs
@@ -338,6 +338,12 @@ module.exports = require("util");
/***/ }),
/* 4 */
+/***/ (function(module, exports) {
+
+module.exports = require("fs");
+
+/***/ }),
+/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1393,7 +1399,7 @@ exports.normalizeOS = normalizeOS;
var _fs;
function _load_fs() {
- return _fs = _interopRequireDefault(__webpack_require__(5));
+ return _fs = _interopRequireDefault(__webpack_require__(4));
}
var _glob;
@@ -1417,19 +1423,19 @@ function _load_path() {
var _blockingQueue;
function _load_blockingQueue() {
- return _blockingQueue = _interopRequireDefault(__webpack_require__(110));
+ return _blockingQueue = _interopRequireDefault(__webpack_require__(111));
}
var _promise;
function _load_promise() {
- return _promise = _interopRequireWildcard(__webpack_require__(50));
+ return _promise = _interopRequireWildcard(__webpack_require__(51));
}
var _promise2;
function _load_promise2() {
- return _promise2 = __webpack_require__(50);
+ return _promise2 = __webpack_require__(51);
}
var _map;
@@ -1441,7 +1447,7 @@ function _load_map() {
var _fsNormalized;
function _load_fsNormalized() {
- return _fsNormalized = __webpack_require__(218);
+ return _fsNormalized = __webpack_require__(219);
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -1516,12 +1522,6 @@ function normalizeOS(body) {
const cr = '\r'.charCodeAt(0);
const lf = '\n'.charCodeAt(0);
-/***/ }),
-/* 5 */
-/***/ (function(module, exports) {
-
-module.exports = require("fs");
-
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
@@ -1580,7 +1580,7 @@ exports.OneTimePasswordError = OneTimePasswordError;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(321);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(186);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(323);
/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
@@ -2027,7 +2027,7 @@ module.exports = invariant;
"use strict";
-var YAMLException = __webpack_require__(54);
+var YAMLException = __webpack_require__(55);
var TYPE_CONSTRUCTOR_OPTIONS = [
'kind',
@@ -2102,9 +2102,9 @@ module.exports = require("crypto");
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(322);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(932);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(186);
/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
@@ -2718,7 +2718,7 @@ function _load_asyncToGenerator() {
var _parse;
function _load_parse() {
- return _parse = __webpack_require__(105);
+ return _parse = __webpack_require__(106);
}
Object.defineProperty(exports, 'parse', {
@@ -2731,7 +2731,7 @@ Object.defineProperty(exports, 'parse', {
var _stringify;
function _load_stringify() {
- return _stringify = __webpack_require__(199);
+ return _stringify = __webpack_require__(200);
}
Object.defineProperty(exports, 'stringify', {
@@ -2758,7 +2758,7 @@ function _load_normalizePattern() {
var _parse2;
function _load_parse2() {
- return _parse2 = _interopRequireDefault(__webpack_require__(105));
+ return _parse2 = _interopRequireDefault(__webpack_require__(106));
}
var _constants;
@@ -2770,7 +2770,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -2994,23 +2994,6 @@ exports.default = Lockfile;
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
-var store = __webpack_require__(133)('wks');
-var uid = __webpack_require__(137);
-var Symbol = __webpack_require__(17).Symbol;
-var USE_SYMBOL = typeof Symbol == 'function';
-
-var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-
-$exports.store = store;
-
-
-/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
-
"use strict";
@@ -3036,6 +3019,23 @@ exports.default = _assign2.default || function (target) {
return target;
};
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var store = __webpack_require__(133)('wks');
+var uid = __webpack_require__(137);
+var Symbol = __webpack_require__(17).Symbol;
+var USE_SYMBOL = typeof Symbol == 'function';
+
+var $exports = module.exports = function (name) {
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+
+$exports.store = store;
+
+
/***/ }),
/* 22 */
/***/ (function(module, exports) {
@@ -4387,7 +4387,7 @@ module.exports = require("url");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441);
/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */
@@ -4954,7 +4954,7 @@ formats['pkcs1'] = __webpack_require__(327);
formats['pkcs8'] = __webpack_require__(157);
formats['rfc4253'] = __webpack_require__(103);
formats['ssh'] = __webpack_require__(456);
-formats['ssh-private'] = __webpack_require__(192);
+formats['ssh-private'] = __webpack_require__(193);
formats['openssh'] = formats['ssh-private'];
formats['dnssec'] = __webpack_require__(326);
@@ -5707,7 +5707,7 @@ formats['pem'] = __webpack_require__(86);
formats['pkcs1'] = __webpack_require__(327);
formats['pkcs8'] = __webpack_require__(157);
formats['rfc4253'] = __webpack_require__(103);
-formats['ssh-private'] = __webpack_require__(192);
+formats['ssh-private'] = __webpack_require__(193);
formats['openssh'] = formats['ssh-private'];
formats['ssh'] = formats['ssh-private'];
formats['dnssec'] = __webpack_require__(326);
@@ -5940,7 +5940,7 @@ exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefi
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -6047,7 +6047,7 @@ function _load_hooks() {
var _index;
function _load_index() {
- return _index = _interopRequireDefault(__webpack_require__(220));
+ return _index = _interopRequireDefault(__webpack_require__(221));
}
var _errors;
@@ -6059,7 +6059,7 @@ function _load_errors() {
var _integrityChecker;
function _load_integrityChecker() {
- return _integrityChecker = _interopRequireDefault(__webpack_require__(208));
+ return _integrityChecker = _interopRequireDefault(__webpack_require__(209));
}
var _lockfile;
@@ -6077,7 +6077,7 @@ function _load_lockfile2() {
var _packageFetcher;
function _load_packageFetcher() {
- return _packageFetcher = _interopRequireWildcard(__webpack_require__(210));
+ return _packageFetcher = _interopRequireWildcard(__webpack_require__(211));
}
var _packageInstallScripts;
@@ -6089,7 +6089,7 @@ function _load_packageInstallScripts() {
var _packageCompatibility;
function _load_packageCompatibility() {
- return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209));
+ return _packageCompatibility = _interopRequireWildcard(__webpack_require__(210));
}
var _packageResolver;
@@ -6101,13 +6101,13 @@ function _load_packageResolver() {
var _packageLinker;
function _load_packageLinker() {
- return _packageLinker = _interopRequireDefault(__webpack_require__(211));
+ return _packageLinker = _interopRequireDefault(__webpack_require__(212));
}
var _index2;
function _load_index2() {
- return _index2 = __webpack_require__(57);
+ return _index2 = __webpack_require__(58);
}
var _index3;
@@ -6137,7 +6137,7 @@ function _load_normalizePattern() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _map;
@@ -6149,7 +6149,7 @@ function _load_map() {
var _yarnVersion;
function _load_yarnVersion() {
- return _yarnVersion = __webpack_require__(120);
+ return _yarnVersion = __webpack_require__(105);
}
var _generatePnpMap;
@@ -6167,7 +6167,7 @@ function _load_workspaceLayout() {
var _resolutionMap;
function _load_resolutionMap() {
- return _resolutionMap = _interopRequireDefault(__webpack_require__(214));
+ return _resolutionMap = _interopRequireDefault(__webpack_require__(215));
}
var _guessName;
@@ -6192,7 +6192,7 @@ const emoji = __webpack_require__(302);
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
const semver = __webpack_require__(22);
-const uuid = __webpack_require__(119);
+const uuid = __webpack_require__(120);
const ssri = __webpack_require__(65);
const ONE_DAY = 1000 * 60 * 60 * 24;
@@ -7485,7 +7485,7 @@ function setFlags(commander) {
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
-var isObject = __webpack_require__(52);
+var isObject = __webpack_require__(53);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
@@ -7504,7 +7504,7 @@ module.exports = function (it) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321);
/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
@@ -24882,7 +24882,7 @@ var isArray = Array.isArray || (function (x) { return x && typeof x.length === '
var dP = __webpack_require__(72);
var createDesc = __webpack_require__(132);
-module.exports = __webpack_require__(51) ? function (object, key, value) {
+module.exports = __webpack_require__(52) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
@@ -24966,7 +24966,7 @@ module.exports.extend = extend;
/*eslint-disable max-len*/
var common = __webpack_require__(43);
-var YAMLException = __webpack_require__(54);
+var YAMLException = __webpack_require__(55);
var Type = __webpack_require__(10);
@@ -25232,6 +25232,223 @@ function isScheduler(value) {
"use strict";
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.exec = exports.queue = undefined;
+exports.forkp = forkp;
+exports.spawnp = spawnp;
+exports.forwardSignalToSpawnedProcesses = forwardSignalToSpawnedProcesses;
+exports.spawn = spawn;
+
+var _constants;
+
+function _load_constants() {
+ return _constants = _interopRequireWildcard(__webpack_require__(8));
+}
+
+var _blockingQueue;
+
+function _load_blockingQueue() {
+ return _blockingQueue = _interopRequireDefault(__webpack_require__(111));
+}
+
+var _errors;
+
+function _load_errors() {
+ return _errors = __webpack_require__(6);
+}
+
+var _promise;
+
+function _load_promise() {
+ return _promise = __webpack_require__(51);
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+/* global child_process$spawnOpts */
+
+const child = __webpack_require__(331);
+const fs = __webpack_require__(4);
+const path = __webpack_require__(0);
+
+const queue = exports.queue = new (_blockingQueue || _load_blockingQueue()).default('child', (_constants || _load_constants()).CHILD_CONCURRENCY);
+
+// TODO: this uid check is kinda whack
+let uid = 0;
+
+const exec = exports.exec = (0, (_promise || _load_promise()).promisify)(child.exec);
+
+function validate(program, opts = {}) {
+ if (program.match(/[\\\/]/)) {
+ return;
+ }
+
+ if (process.platform === 'win32' && process.env.PATHEXT) {
+ const cwd = opts.cwd || process.cwd();
+ const pathext = process.env.PATHEXT;
+
+ for (var _iterator = pathext.split(';'), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
+ var _ref;
+
+ if (_isArray) {
+ if (_i >= _iterator.length) break;
+ _ref = _iterator[_i++];
+ } else {
+ _i = _iterator.next();
+ if (_i.done) break;
+ _ref = _i.value;
+ }
+
+ const ext = _ref;
+
+ const candidate = path.join(cwd, `${program}${ext}`);
+ if (fs.existsSync(candidate)) {
+ throw new Error(`Potentially dangerous call to "${program}" in ${cwd}`);
+ }
+ }
+ }
+}
+
+function forkp(program, args, opts) {
+ validate(program, opts);
+ const key = String(++uid);
+ return new Promise((resolve, reject) => {
+ const proc = child.fork(program, args, opts);
+ spawnedProcesses[key] = proc;
+
+ proc.on('error', error => {
+ reject(error);
+ });
+
+ proc.on('close', exitCode => {
+ resolve(exitCode);
+ });
+ });
+}
+
+function spawnp(program, args, opts) {
+ validate(program, opts);
+ const key = String(++uid);
+ return new Promise((resolve, reject) => {
+ const proc = child.spawn(program, args, opts);
+ spawnedProcesses[key] = proc;
+
+ proc.on('error', error => {
+ reject(error);
+ });
+
+ proc.on('close', exitCode => {
+ resolve(exitCode);
+ });
+ });
+}
+
+const spawnedProcesses = {};
+
+function forwardSignalToSpawnedProcesses(signal) {
+ for (var _iterator2 = Object.keys(spawnedProcesses), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
+ var _ref2;
+
+ if (_isArray2) {
+ if (_i2 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i2++];
+ } else {
+ _i2 = _iterator2.next();
+ if (_i2.done) break;
+ _ref2 = _i2.value;
+ }
+
+ const key = _ref2;
+
+ spawnedProcesses[key].kill(signal);
+ }
+}
+
+function spawn(program, args, opts = {}, onData) {
+ const key = opts.cwd || String(++uid);
+ return queue.push(key, () => new Promise((resolve, reject) => {
+ validate(program, opts);
+
+ const proc = child.spawn(program, args, opts);
+ spawnedProcesses[key] = proc;
+
+ let processingDone = false;
+ let processClosed = false;
+ let err = null;
+
+ let stdout = '';
+
+ proc.on('error', err => {
+ if (err.code === 'ENOENT') {
+ reject(new (_errors || _load_errors()).ProcessSpawnError(`Couldn't find the binary ${program}`, err.code, program));
+ } else {
+ reject(err);
+ }
+ });
+
+ function updateStdout(chunk) {
+ stdout += chunk;
+ if (onData) {
+ onData(chunk);
+ }
+ }
+
+ function finish() {
+ delete spawnedProcesses[key];
+ if (err) {
+ reject(err);
+ } else {
+ resolve(stdout.trim());
+ }
+ }
+
+ if (typeof opts.process === 'function') {
+ opts.process(proc, updateStdout, reject, function () {
+ if (processClosed) {
+ finish();
+ } else {
+ processingDone = true;
+ }
+ });
+ } else {
+ if (proc.stderr) {
+ proc.stderr.on('data', updateStdout);
+ }
+
+ if (proc.stdout) {
+ proc.stdout.on('data', updateStdout);
+ }
+
+ processingDone = true;
+ }
+
+ proc.on('close', (code, signal) => {
+ if (signal || code >= 1) {
+ err = new (_errors || _load_errors()).ProcessTermError(['Command failed.', signal ? `Exit signal: ${signal}` : `Exit code: ${code}`, `Command: ${program}`, `Arguments: ${args.join(' ')}`, `Directory: ${opts.cwd || process.cwd()}`, `Output:\n${stdout.trim()}`].join('\n'));
+ err.EXIT_SIGNAL = signal;
+ err.EXIT_CODE = code;
+ }
+
+ if (processingDone || err) {
+ finish();
+ } else {
+ processClosed = true;
+ }
+ });
+ }));
+}
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -25309,17 +25526,17 @@ function queue(arr, promiseProducer, concurrency = Infinity) {
}
/***/ }),
-/* 51 */
+/* 52 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
-module.exports = !__webpack_require__(112)(function () {
+module.exports = !__webpack_require__(113)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
-/* 52 */
+/* 53 */
/***/ (function(module, exports) {
module.exports = function (it) {
@@ -25328,14 +25545,14 @@ module.exports = function (it) {
/***/ }),
-/* 53 */
+/* 54 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
-/* 54 */
+/* 55 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25385,7 +25602,7 @@ module.exports = YAMLException;
/***/ }),
-/* 55 */
+/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25420,7 +25637,7 @@ module.exports = new Schema({
/***/ }),
-/* 56 */
+/* 57 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -25446,7 +25663,7 @@ function tryCatch(fn) {
/***/ }),
-/* 57 */
+/* 58 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25478,182 +25695,6 @@ const registries = exports.registries = {
const registryNames = exports.registryNames = Object.keys(registries);
-/***/ }),
-/* 58 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.exec = exports.queue = undefined;
-exports.forkp = forkp;
-exports.spawnp = spawnp;
-exports.forwardSignalToSpawnedProcesses = forwardSignalToSpawnedProcesses;
-exports.spawn = spawn;
-
-var _constants;
-
-function _load_constants() {
- return _constants = _interopRequireWildcard(__webpack_require__(8));
-}
-
-var _blockingQueue;
-
-function _load_blockingQueue() {
- return _blockingQueue = _interopRequireDefault(__webpack_require__(110));
-}
-
-var _errors;
-
-function _load_errors() {
- return _errors = __webpack_require__(6);
-}
-
-var _promise;
-
-function _load_promise() {
- return _promise = __webpack_require__(50);
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-/* global child_process$spawnOpts */
-
-const child = __webpack_require__(331);
-
-const queue = exports.queue = new (_blockingQueue || _load_blockingQueue()).default('child', (_constants || _load_constants()).CHILD_CONCURRENCY);
-
-// TODO: this uid check is kinda whack
-let uid = 0;
-
-const exec = exports.exec = (0, (_promise || _load_promise()).promisify)(child.exec);
-
-function forkp(program, args, opts) {
- return new Promise((resolve, reject) => {
- const proc = child.fork(program, args, opts);
-
- proc.on('error', error => {
- reject(error);
- });
-
- proc.on('close', exitCode => {
- resolve(exitCode);
- });
- });
-}
-
-function spawnp(program, args, opts) {
- return new Promise((resolve, reject) => {
- const proc = child.spawn(program, args, opts);
-
- proc.on('error', error => {
- reject(error);
- });
-
- proc.on('close', exitCode => {
- resolve(exitCode);
- });
- });
-}
-
-const spawnedProcesses = {};
-
-function forwardSignalToSpawnedProcesses(signal) {
- for (var _iterator = Object.keys(spawnedProcesses), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- var _ref;
-
- if (_isArray) {
- if (_i >= _iterator.length) break;
- _ref = _iterator[_i++];
- } else {
- _i = _iterator.next();
- if (_i.done) break;
- _ref = _i.value;
- }
-
- const key = _ref;
-
- spawnedProcesses[key].kill(signal);
- }
-}
-
-function spawn(program, args, opts = {}, onData) {
- const key = opts.cwd || String(++uid);
- return queue.push(key, () => new Promise((resolve, reject) => {
- const proc = child.spawn(program, args, opts);
- spawnedProcesses[key] = proc;
-
- let processingDone = false;
- let processClosed = false;
- let err = null;
-
- let stdout = '';
-
- proc.on('error', err => {
- if (err.code === 'ENOENT') {
- reject(new (_errors || _load_errors()).ProcessSpawnError(`Couldn't find the binary ${program}`, err.code, program));
- } else {
- reject(err);
- }
- });
-
- function updateStdout(chunk) {
- stdout += chunk;
- if (onData) {
- onData(chunk);
- }
- }
-
- function finish() {
- delete spawnedProcesses[key];
- if (err) {
- reject(err);
- } else {
- resolve(stdout.trim());
- }
- }
-
- if (typeof opts.process === 'function') {
- opts.process(proc, updateStdout, reject, function () {
- if (processClosed) {
- finish();
- } else {
- processingDone = true;
- }
- });
- } else {
- if (proc.stderr) {
- proc.stderr.on('data', updateStdout);
- }
-
- if (proc.stdout) {
- proc.stdout.on('data', updateStdout);
- }
-
- processingDone = true;
- }
-
- proc.on('close', (code, signal) => {
- if (signal || code >= 1) {
- err = new (_errors || _load_errors()).ProcessTermError(['Command failed.', signal ? `Exit signal: ${signal}` : `Exit code: ${code}`, `Command: ${program}`, `Arguments: ${args.join(' ')}`, `Directory: ${opts.cwd || process.cwd()}`, `Output:\n${stdout.trim()}`].join('\n'));
- err.EXIT_SIGNAL = signal;
- err.EXIT_CODE = code;
- }
-
- if (processingDone || err) {
- finish();
- } else {
- processClosed = true;
- }
- });
- }));
-}
-
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
@@ -25980,7 +26021,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_operators_mergeScan__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__ = __webpack_require__(875);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__ = __webpack_require__(117);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__ = __webpack_require__(434);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__["b"]; });
@@ -26002,7 +26043,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return __WEBPACK_IMPORTED_MODULE_58__internal_operators_publishReplay__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__ = __webpack_require__(884);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__ = __webpack_require__(187);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__ = __webpack_require__(188);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__ = __webpack_require__(885);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__["a"]; });
@@ -26060,7 +26101,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_87__internal_operators_throttle__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__ = __webpack_require__(905);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__ = __webpack_require__(188);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__ = __webpack_require__(189);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__ = __webpack_require__(906);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__["a"]; });
@@ -26629,7 +26670,7 @@ exports.home = undefined;
var _rootUser;
function _load_rootUser() {
- return _rootUser = _interopRequireDefault(__webpack_require__(223));
+ return _rootUser = _interopRequireDefault(__webpack_require__(224));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -26708,7 +26749,7 @@ var IE8_DOM_DEFINE = __webpack_require__(238);
var toPrimitive = __webpack_require__(255);
var dP = Object.defineProperty;
-exports.f = __webpack_require__(51) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+exports.f = __webpack_require__(52) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
@@ -26743,7 +26784,7 @@ var Schema = __webpack_require__(44);
module.exports = Schema.DEFAULT = new Schema({
include: [
- __webpack_require__(55)
+ __webpack_require__(56)
],
explicit: [
__webpack_require__(290),
@@ -29586,7 +29627,7 @@ function _load_baseResolver() {
var _npmResolver;
function _load_npmResolver() {
- return _npmResolver = _interopRequireDefault(__webpack_require__(217));
+ return _npmResolver = _interopRequireDefault(__webpack_require__(218));
}
var _yarnResolver;
@@ -29616,7 +29657,7 @@ function _load_githubResolver() {
var _fileResolver;
function _load_fileResolver() {
- return _fileResolver = _interopRequireDefault(__webpack_require__(215));
+ return _fileResolver = _interopRequireDefault(__webpack_require__(216));
}
var _linkResolver;
@@ -29634,7 +29675,7 @@ function _load_gitlabResolver() {
var _gistResolver;
function _load_gistResolver() {
- return _gistResolver = _interopRequireDefault(__webpack_require__(216));
+ return _gistResolver = _interopRequireDefault(__webpack_require__(217));
}
var _bitbucketResolver;
@@ -29646,7 +29687,7 @@ function _load_bitbucketResolver() {
var _hostedGitResolver;
function _load_hostedGitResolver() {
- return _hostedGitResolver = __webpack_require__(109);
+ return _hostedGitResolver = __webpack_require__(110);
}
var _registryResolver;
@@ -29730,7 +29771,7 @@ for (const key in registries) {
var _ = __webpack_require__(38);
var chalk = __webpack_require__(30);
-var runAsync = __webpack_require__(181);
+var runAsync = __webpack_require__(182);
var { filter, flatMap, share, take, takeUntil } = __webpack_require__(63);
var Choices = __webpack_require__(686);
var ScreenManager = __webpack_require__(697);
@@ -29878,7 +29919,7 @@ module.exports = Prompt;
"use strict";
-var { fromEvent } = __webpack_require__(182);
+var { fromEvent } = __webpack_require__(183);
var { filter, map, share } = __webpack_require__(63);
function normalizeKeypressEvents(value, key) {
@@ -32370,7 +32411,7 @@ var PrivateKey = __webpack_require__(33);
var pkcs1 = __webpack_require__(327);
var pkcs8 = __webpack_require__(157);
-var sshpriv = __webpack_require__(192);
+var sshpriv = __webpack_require__(193);
var rfc4253 = __webpack_require__(103);
var errors = __webpack_require__(74);
@@ -32567,7 +32608,7 @@ exports.SCOPE_SEPARATOR = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -32585,13 +32626,13 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _npmResolver;
function _load_npmResolver() {
- return _npmResolver = _interopRequireDefault(__webpack_require__(217));
+ return _npmResolver = _interopRequireDefault(__webpack_require__(218));
}
var _envReplace;
@@ -32645,7 +32686,7 @@ function _load_errors() {
var _login;
function _load_login() {
- return _login = __webpack_require__(107);
+ return _login = __webpack_require__(108);
}
var _path2;
@@ -33225,7 +33266,7 @@ module.exports = function (it) {
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
-var isObject = __webpack_require__(52);
+var isObject = __webpack_require__(53);
var document = __webpack_require__(17).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
@@ -33272,7 +33313,7 @@ module.exports.f = function (C) {
var def = __webpack_require__(72).f;
var has = __webpack_require__(71);
-var TAG = __webpack_require__(20)('toStringTag');
+var TAG = __webpack_require__(21)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
@@ -33307,7 +33348,7 @@ module.exports = function (it) {
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = __webpack_require__(170);
+var IObject = __webpack_require__(171);
var defined = __webpack_require__(91);
module.exports = function (it) {
return IObject(defined(it));
@@ -33360,7 +33401,7 @@ module.exports = function (it) {
module.exports = glob
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var rp = __webpack_require__(140)
var minimatch = __webpack_require__(82)
var Minimatch = minimatch.Minimatch
@@ -34180,7 +34221,7 @@ if (process.env.READABLE_STREAM === 'disable' && Stream) {
exports.Stream = Stream || exports;
exports.Readable = exports;
exports.Writable = __webpack_require__(408);
- exports.Duplex = __webpack_require__(115);
+ exports.Duplex = __webpack_require__(116);
exports.Transform = __webpack_require__(407);
exports.PassThrough = __webpack_require__(792);
}
@@ -34371,6 +34412,85 @@ module.exports = require("tty");
"use strict";
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getInstallationMethod = exports.version = undefined;
+
+var _asyncToGenerator2;
+
+function _load_asyncToGenerator() {
+ return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2));
+}
+
+let getInstallationMethod = exports.getInstallationMethod = (() => {
+ var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
+ let installationMethod = originalInstallationMethod;
+
+ // If there's a package.json in the parent directory, it could have an
+ // override for the installation method, so we should prefer that over
+ // whatever was originally in Yarn's package.json. This is the case with
+ // systems such as Homebrew, which take the tarball and modify the
+ // installation method so we're aware of the fact that Yarn was installed via
+ // Homebrew (so things like update notifications can point out the correct
+ // command to upgrade).
+ try {
+ const manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json');
+ if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) {
+ // non-async version is deprecated
+ const manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath);
+ if (manifest.installationMethod) {
+ installationMethod = manifest.installationMethod;
+ }
+ }
+ } catch (e) {
+ // Ignore any errors; this is not critical functionality.
+ }
+ return installationMethod;
+ });
+
+ return function getInstallationMethod() {
+ return _ref.apply(this, arguments);
+ };
+})();
+
+var _fs;
+
+function _load_fs() {
+ return _fs = __webpack_require__(5);
+}
+
+var _fs2;
+
+function _load_fs2() {
+ return _fs2 = _interopRequireDefault(__webpack_require__(4));
+}
+
+var _path;
+
+function _load_path() {
+ return _path = _interopRequireDefault(__webpack_require__(0));
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+// This will be bundled directly in the .js file for production builds
+var _require = __webpack_require__(195); /**
+ * Determines the current version of Yarn itself.
+ *
+ */
+
+const version = _require.version,
+ originalInstallationMethod = _require.installationMethod;
+exports.version = version;
+
+/***/ }),
+/* 106 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -34847,7 +34967,7 @@ function parseWithConflict(str, fileLoc) {
}
/***/ }),
-/* 106 */
+/* 107 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34862,7 +34982,7 @@ module.exports = {
toHash: toHash,
getProperty: getProperty,
escapeQuotes: escapeQuotes,
- equal: __webpack_require__(204),
+ equal: __webpack_require__(205),
ucs2length: __webpack_require__(480),
varOccurences: varOccurences,
varReplace: varReplace,
@@ -35121,7 +35241,7 @@ function unescapeJsonPointer(str) {
/***/ }),
-/* 107 */
+/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35306,7 +35426,7 @@ function setFlags(commander) {
}
/***/ }),
-/* 108 */
+/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35620,7 +35740,7 @@ class BaseReporter {
exports.default = BaseReporter;
/***/ }),
-/* 109 */
+/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35647,7 +35767,7 @@ function _load_errors() {
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _gitResolver;
@@ -35665,7 +35785,7 @@ function _load_exoticResolver() {
var _git;
function _load_git() {
- return _git = _interopRequireDefault(__webpack_require__(219));
+ return _git = _interopRequireDefault(__webpack_require__(220));
}
var _guessName;
@@ -35913,7 +36033,7 @@ class HostedGitResolver extends (_exoticResolver || _load_exoticResolver()).defa
exports.default = HostedGitResolver;
/***/ }),
-/* 110 */
+/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36058,7 +36178,7 @@ class BlockingQueue {
exports.default = BlockingQueue;
/***/ }),
-/* 111 */
+/* 112 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36072,7 +36192,7 @@ exports.execCommand = exports.execFromManifest = exports.executeLifecycleScript
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -36478,13 +36598,13 @@ function _load_constants() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _dynamicRequire;
@@ -36550,7 +36670,7 @@ function checkForGypIfNeeded(config, cmd, paths) {
}
/***/ }),
-/* 112 */
+/* 113 */
/***/ (function(module, exports) {
module.exports = function (exec) {
@@ -36563,7 +36683,7 @@ module.exports = function (exec) {
/***/ }),
-/* 113 */
+/* 114 */
/***/ (function(module, exports) {
// Copyright Joyent, Inc. and other Node contributors.
@@ -36676,7 +36796,7 @@ function objectToString(o) {
/***/ }),
-/* 114 */
+/* 115 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -37114,7 +37234,7 @@ module.exports = micromatch;
/***/ }),
-/* 115 */
+/* 116 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -37148,7 +37268,7 @@ module.exports = micromatch;
/**/
-var pna = __webpack_require__(180);
+var pna = __webpack_require__(181);
/**/
/**/
@@ -37163,7 +37283,7 @@ var objectKeys = Object.keys || function (obj) {
module.exports = Duplex;
/**/
-var util = __webpack_require__(113);
+var util = __webpack_require__(114);
util.inherits = __webpack_require__(61);
/**/
@@ -37251,7 +37371,7 @@ Duplex.prototype._destroy = function (err, cb) {
};
/***/ }),
-/* 116 */
+/* 117 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -37299,7 +37419,7 @@ var MulticastOperator = /*@__PURE__*/ (function () {
/***/ }),
-/* 117 */
+/* 118 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -37310,7 +37430,7 @@ var observable = typeof Symbol === 'function' && Symbol.observable || '@@observa
/***/ }),
-/* 118 */
+/* 119 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -37323,7 +37443,7 @@ function identity(x) {
/***/ }),
-/* 119 */
+/* 120 */
/***/ (function(module, exports, __webpack_require__) {
var v1 = __webpack_require__(957);
@@ -37336,85 +37456,6 @@ uuid.v4 = v4;
module.exports = uuid;
-/***/ }),
-/* 120 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.getInstallationMethod = exports.version = undefined;
-
-var _asyncToGenerator2;
-
-function _load_asyncToGenerator() {
- return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2));
-}
-
-let getInstallationMethod = exports.getInstallationMethod = (() => {
- var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
- let installationMethod = originalInstallationMethod;
-
- // If there's a package.json in the parent directory, it could have an
- // override for the installation method, so we should prefer that over
- // whatever was originally in Yarn's package.json. This is the case with
- // systems such as Homebrew, which take the tarball and modify the
- // installation method so we're aware of the fact that Yarn was installed via
- // Homebrew (so things like update notifications can point out the correct
- // command to upgrade).
- try {
- const manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json');
- if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) {
- // non-async version is deprecated
- const manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath);
- if (manifest.installationMethod) {
- installationMethod = manifest.installationMethod;
- }
- }
- } catch (e) {
- // Ignore any errors; this is not critical functionality.
- }
- return installationMethod;
- });
-
- return function getInstallationMethod() {
- return _ref.apply(this, arguments);
- };
-})();
-
-var _fs;
-
-function _load_fs() {
- return _fs = __webpack_require__(4);
-}
-
-var _fs2;
-
-function _load_fs2() {
- return _fs2 = _interopRequireDefault(__webpack_require__(5));
-}
-
-var _path;
-
-function _load_path() {
- return _path = _interopRequireDefault(__webpack_require__(0));
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// This will be bundled directly in the .js file for production builds
-var _require = __webpack_require__(194); /**
- * Determines the current version of Yarn itself.
- *
- */
-
-const version = _require.version,
- originalInstallationMethod = _require.installationMethod;
-exports.version = version;
-
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
@@ -37707,13 +37748,13 @@ function _load_errors() {
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = _interopRequireDefault(__webpack_require__(108));
+ return _baseReporter = _interopRequireDefault(__webpack_require__(109));
}
var _buildSubCommands2;
@@ -37749,7 +37790,7 @@ function _load_remove() {
var _upgrade;
function _load_upgrade() {
- return _upgrade = __webpack_require__(207);
+ return _upgrade = __webpack_require__(208);
}
var _upgradeInteractive;
@@ -37761,7 +37802,7 @@ function _load_upgradeInteractive() {
var _packageLinker;
function _load_packageLinker() {
- return _packageLinker = __webpack_require__(211);
+ return _packageLinker = __webpack_require__(212);
}
var _constants;
@@ -37773,7 +37814,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -38017,7 +38058,7 @@ function _load_workspaceResolver() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _normalizePattern4;
@@ -38030,7 +38071,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const micromatch = __webpack_require__(114);
+const micromatch = __webpack_require__(115);
class PackageRequest {
constructor(req, resolver) {
@@ -38589,7 +38630,7 @@ function _load_guessName() {
var _index2;
function _load_index2() {
- return _index2 = __webpack_require__(57);
+ return _index2 = __webpack_require__(58);
}
var _exoticResolver;
@@ -38601,7 +38642,7 @@ function _load_exoticResolver() {
var _git;
function _load_git() {
- return _git = _interopRequireDefault(__webpack_require__(219));
+ return _git = _interopRequireDefault(__webpack_require__(220));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -38858,7 +38899,7 @@ function _load_errors() {
var _util;
function _load_util() {
- return _util = __webpack_require__(221);
+ return _util = __webpack_require__(222);
}
var _typos;
@@ -39022,7 +39063,7 @@ function cleanDependencies(info, isRoot, reporter, warn) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(69);
-var TAG = __webpack_require__(20)('toStringTag');
+var TAG = __webpack_require__(21)('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';
@@ -39073,11 +39114,11 @@ var LIBRARY = __webpack_require__(93);
var $export = __webpack_require__(60);
var redefine = __webpack_require__(251);
var hide = __webpack_require__(42);
-var Iterators = __webpack_require__(53);
+var Iterators = __webpack_require__(54);
var $iterCreate = __webpack_require__(242);
var setToStringTag = __webpack_require__(95);
var getPrototypeOf = __webpack_require__(248);
-var ITERATOR = __webpack_require__(20)('iterator');
+var ITERATOR = __webpack_require__(21)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
@@ -39157,7 +39198,7 @@ module.exports = function (exec) {
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(35);
-var isObject = __webpack_require__(52);
+var isObject = __webpack_require__(53);
var newPromiseCapability = __webpack_require__(94);
module.exports = function (C, x) {
@@ -39209,7 +39250,7 @@ var store = global[SHARED] || (global[SHARED] = {});
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(35);
var aFunction = __webpack_require__(68);
-var SPECIES = __webpack_require__(20)('species');
+var SPECIES = __webpack_require__(21)('species');
module.exports = function (O, D) {
var C = anObject(O).constructor;
var S;
@@ -40139,7 +40180,7 @@ realpath.realpathSync = realpathSync
realpath.monkeypatch = monkeypatch
realpath.unmonkeypatch = unmonkeypatch
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var origRealpath = fs.realpath
var origRealpathSync = fs.realpathSync
@@ -40520,7 +40561,7 @@ module.exports = new Schema({
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(0);
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var _0777 = parseInt('0777', 8);
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
@@ -42772,7 +42813,7 @@ Object.defineProperty(exports, "__esModule", {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -42786,7 +42827,7 @@ exports.extractWorkspaces = extractWorkspaces;
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = __webpack_require__(111);
+ return _executeLifecycleScript = __webpack_require__(112);
}
var _path;
@@ -42804,7 +42845,7 @@ function _load_conversion() {
var _index;
function _load_index() {
- return _index = _interopRequireDefault(__webpack_require__(220));
+ return _index = _interopRequireDefault(__webpack_require__(221));
}
var _errors;
@@ -42816,7 +42857,7 @@ function _load_errors() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -42840,13 +42881,13 @@ function _load_requestManager() {
var _index2;
function _load_index2() {
- return _index2 = __webpack_require__(57);
+ return _index2 = __webpack_require__(58);
}
var _index3;
function _load_index3() {
- return _index3 = __webpack_require__(200);
+ return _index3 = __webpack_require__(201);
}
var _map;
@@ -42863,7 +42904,7 @@ const crypto = __webpack_require__(11);
const detectIndent = __webpack_require__(635);
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
-const micromatch = __webpack_require__(114);
+const micromatch = __webpack_require__(115);
const isCi = __webpack_require__(397);
function sortObject(object) {
@@ -43952,7 +43993,7 @@ function _load_asyncToGenerator() {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
let run = exports.run = (() => {
@@ -44028,7 +44069,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _invariant;
@@ -44622,7 +44663,7 @@ exports.hasWrapper = hasWrapper;
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _filter;
@@ -44641,10 +44682,10 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const zlib = __webpack_require__(198);
+const zlib = __webpack_require__(199);
const path = __webpack_require__(0);
-const tar = __webpack_require__(193);
-const fs2 = __webpack_require__(5);
+const tar = __webpack_require__(194);
+const fs2 = __webpack_require__(4);
const depsFor = __webpack_require__(678);
const FOLDERS_IGNORE = [
@@ -44703,7 +44744,7 @@ function _load_asyncToGenerator() {
var _index;
function _load_index() {
- return _index = _interopRequireDefault(__webpack_require__(220));
+ return _index = _interopRequireDefault(__webpack_require__(221));
}
var _constants;
@@ -44715,7 +44756,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _mutex;
@@ -44730,7 +44771,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
/* eslint no-unused-vars: 0 */
-const cmdShim = __webpack_require__(201);
+const cmdShim = __webpack_require__(202);
const path = __webpack_require__(0);
class BaseFetcher {
@@ -44967,6 +45008,139 @@ function guessName(source) {
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.satisfiesWithPrereleases = satisfiesWithPrereleases;
+exports.diffWithUnstable = diffWithUnstable;
+
+var _semver;
+
+function _load_semver() {
+ return _semver = _interopRequireDefault(__webpack_require__(22));
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/**
+ * Returns whether the given semver version satisfies the given range. Notably this supports
+ * prerelease versions so that "2.0.0-rc.0" satisfies the range ">=1.0.0", for example.
+ */
+
+function satisfiesWithPrereleases(version, range, loose = false) {
+ let semverRange;
+ try {
+ // $FlowFixMe: Add a definition for the Range class
+ semverRange = new (_semver || _load_semver()).default.Range(range, loose);
+ } catch (err) {
+ return false;
+ }
+
+ if (!version) {
+ return false;
+ }
+ let semverVersion;
+ try {
+ semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose);
+ } catch (err) {
+ return false;
+ }
+
+ // A range has multiple sets of comparators. A version must satisfy all comparators in a set
+ // and at least one set to satisfy the range.
+ return semverRange.set.some(comparatorSet => {
+ // node-semver converts ~ and ^ ranges into pairs of >= and < ranges but the upper bounds don't
+ // properly exclude prerelease versions. For example, "^1.0.0" is converted to ">=1.0.0 <2.0.0",
+ // which includes "2.0.0-pre" since prerelease versions are lower than their non-prerelease
+ // counterparts. As a practical workaround we make upper-bound ranges exclude prereleases and
+ // convert "<2.0.0" to "<2.0.0-0", for example.
+ comparatorSet = comparatorSet.map(comparator => {
+ if (comparator.operator !== '<' || !comparator.value || comparator.semver.prerelease.length) {
+ return comparator;
+ }
+
+ // "0" is the lowest prerelease version
+ comparator.semver.inc('pre', 0);
+
+ const comparatorString = comparator.operator + comparator.semver.version;
+ // $FlowFixMe: Add a definition for the Comparator class
+ return new (_semver || _load_semver()).default.Comparator(comparatorString, comparator.loose);
+ });
+
+ return !comparatorSet.some(comparator => !comparator.test(semverVersion));
+ });
+}
+
+const PRE_RELEASES = {
+ major: 'premajor',
+ minor: 'preminor',
+ patch: 'prepatch'
+};
+
+/**
+ * Returns the difference between two versions as a semantic string representation.
+ * Similar to the `diff` method in node-semver, but it also accounts for unstable versions,
+ * like 0.x.x or 0.0.x.
+ */
+
+function diffWithUnstable(version1, version2) {
+ if ((_semver || _load_semver()).default.eq(version1, version2) === false) {
+ const v1 = (_semver || _load_semver()).default.parse(version1);
+ const v2 = (_semver || _load_semver()).default.parse(version2);
+
+ if (v1 != null && v2 != null) {
+ const isPreRelease = v1.prerelease.length > 0 || v2.prerelease.length > 0;
+ const preMajor = v1.major === 0 || v2.major === 0;
+ const preMinor = preMajor && (v1.minor === 0 || v2.minor === 0);
+
+ let diff = null;
+
+ if (v1.major !== v2.major) {
+ diff = 'major';
+ } else if (v1.minor !== v2.minor) {
+ if (preMajor) {
+ // If the major version number is zero (0.x.x), treat a change
+ // of the minor version number as a major change.
+ diff = 'major';
+ } else {
+ diff = 'minor';
+ }
+ } else if (v1.patch !== v2.patch) {
+ if (preMinor) {
+ // If the major & minor version numbers are zero (0.0.x), treat a change
+ // of the patch version number as a major change.
+ diff = 'major';
+ } else if (preMajor) {
+ // If the major version number is zero (0.x.x), treat a change
+ // of the patch version number as a minor change.
+ diff = 'minor';
+ } else {
+ diff = 'patch';
+ }
+ }
+
+ if (isPreRelease) {
+ if (diff != null) {
+ diff = PRE_RELEASES[diff];
+ } else {
+ diff = 'prerelease';
+ }
+ }
+
+ return diff;
+ }
+ }
+
+ return null;
+}
+
+/***/ }),
+/* 171 */
+/***/ (function(module, exports, __webpack_require__) {
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(69);
// eslint-disable-next-line no-prototype-builtins
@@ -44976,7 +45150,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
/***/ }),
-/* 171 */
+/* 172 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
@@ -44989,7 +45163,7 @@ module.exports = Object.keys || function keys(O) {
/***/ }),
-/* 172 */
+/* 173 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
@@ -45000,7 +45174,7 @@ module.exports = function (it) {
/***/ }),
-/* 173 */
+/* 174 */
/***/ (function(module, exports, __webpack_require__) {
var once = __webpack_require__(83);
@@ -45093,7 +45267,7 @@ module.exports = eos;
/***/ }),
-/* 174 */
+/* 175 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2012 Joyent, Inc. All rights reserved.
@@ -45211,7 +45385,7 @@ module.exports = {
/***/ }),
-/* 175 */
+/* 176 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -45255,7 +45429,7 @@ module.exports = Separator;
/***/ }),
-/* 176 */
+/* 177 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -45315,7 +45489,7 @@ module.exports = Paginator;
/***/ }),
-/* 177 */
+/* 178 */
/***/ (function(module, exports) {
/*!
@@ -45332,7 +45506,7 @@ module.exports = function isExtglob(str) {
/***/ }),
-/* 178 */
+/* 179 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -45342,7 +45516,7 @@ module.exports = function isExtglob(str) {
* Licensed under the MIT License.
*/
-var isExtglob = __webpack_require__(177);
+var isExtglob = __webpack_require__(178);
module.exports = function isGlob(str) {
return typeof str === 'string'
@@ -45351,7 +45525,7 @@ module.exports = function isGlob(str) {
};
/***/ }),
-/* 179 */
+/* 180 */
/***/ (function(module, exports, __webpack_require__) {
var isBuffer = __webpack_require__(729);
@@ -45473,7 +45647,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 180 */
+/* 181 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -45524,7 +45698,7 @@ function nextTick(fn, arg1, arg2, arg3) {
/***/ }),
-/* 181 */
+/* 182 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -45592,7 +45766,7 @@ runAsync.cb = function (func, cb) {
/***/ }),
-/* 182 */
+/* 183 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45603,7 +45777,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return __WEBPACK_IMPORTED_MODULE_1__internal_observable_ConnectableObservable__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__ = __webpack_require__(433);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__ = __webpack_require__(118);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_Subject__ = __webpack_require__(36);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_Subject__["a"]; });
@@ -45611,7 +45785,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(308);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(184);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__ = __webpack_require__(438);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__["a"]; });
@@ -45630,13 +45804,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return __WEBPACK_IMPORTED_MODULE_14__internal_Subscription__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__ = __webpack_require__(7);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(185);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_Notification__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(324);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(191);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(192);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__ = __webpack_require__(119);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__ = __webpack_require__(930);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__["a"]; });
@@ -45644,7 +45818,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(153);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(190);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__ = __webpack_require__(441);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__["a"]; });
@@ -45656,7 +45830,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(309);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(187);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(310);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__["a"]; });
@@ -45700,7 +45874,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["b"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_config__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_config__ = __webpack_require__(186);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_config__["a"]; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
@@ -45760,7 +45934,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/***/ }),
-/* 183 */
+/* 184 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45818,7 +45992,7 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 184 */
+/* 185 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45899,7 +46073,7 @@ var Notification = /*@__PURE__*/ (function () {
/***/ }),
-/* 185 */
+/* 186 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45926,7 +46100,7 @@ var config = {
/***/ }),
-/* 186 */
+/* 187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45954,7 +46128,7 @@ function concat() {
/***/ }),
-/* 187 */
+/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -45982,7 +46156,7 @@ function reduce(accumulator, seed) {
/***/ }),
-/* 188 */
+/* 189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -46013,7 +46187,7 @@ function defaultErrorFactory() {
/***/ }),
-/* 189 */
+/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -46031,7 +46205,7 @@ var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
/***/ }),
-/* 190 */
+/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -46046,7 +46220,7 @@ function isNumeric(val) {
/***/ }),
-/* 191 */
+/* 192 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -46057,7 +46231,7 @@ function noop() { }
/***/ }),
-/* 192 */
+/* 193 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2015 Joyent, Inc.
@@ -46325,14 +46499,14 @@ function write(key, options) {
/***/ }),
-/* 193 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
var chownr = __webpack_require__(600)
var tar = __webpack_require__(460)
var pump = __webpack_require__(781)
var mkdirp = __webpack_require__(145)
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var path = __webpack_require__(0)
var os = __webpack_require__(46)
@@ -46676,37 +46850,37 @@ function mkdirfix (name, opts, cb) {
/***/ }),
-/* 194 */
+/* 195 */
/***/ (function(module, exports) {
-module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.10","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}}
+module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}}
/***/ }),
-/* 195 */
+/* 196 */
/***/ (function(module, exports) {
module.exports = require("https");
/***/ }),
-/* 196 */
+/* 197 */
/***/ (function(module, exports) {
module.exports = require("querystring");
/***/ }),
-/* 197 */
+/* 198 */
/***/ (function(module, exports) {
module.exports = require("readline");
/***/ }),
-/* 198 */
+/* 199 */
/***/ (function(module, exports) {
module.exports = require("zlib");
/***/ }),
-/* 199 */
+/* 200 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -46732,7 +46906,7 @@ function _load_constants() {
var _package;
function _load_package() {
- return _package = __webpack_require__(194);
+ return _package = __webpack_require__(195);
}
const NODE_VERSION = process.version;
@@ -46840,7 +47014,7 @@ function stringify(obj, noHeader, enableVersions) {
}
/***/ }),
-/* 200 */
+/* 201 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -46892,7 +47066,7 @@ Object.defineProperty(exports, 'EventReporter', {
var _jsonReporter;
function _load_jsonReporter() {
- return _jsonReporter = __webpack_require__(213);
+ return _jsonReporter = __webpack_require__(214);
}
Object.defineProperty(exports, 'JSONReporter', {
@@ -46918,7 +47092,7 @@ Object.defineProperty(exports, 'NoopReporter', {
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = __webpack_require__(108);
+ return _baseReporter = __webpack_require__(109);
}
Object.defineProperty(exports, 'Reporter', {
@@ -46931,7 +47105,7 @@ Object.defineProperty(exports, 'Reporter', {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
-/* 201 */
+/* 202 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47204,13 +47378,13 @@ function normalizePathEnvVar (nodePath) {
/***/ }),
-/* 202 */
+/* 203 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var resolve = __webpack_require__(203);
+var resolve = __webpack_require__(204);
module.exports = {
Validation: errorSubclass(ValidationError),
@@ -47245,15 +47419,15 @@ function errorSubclass(Subclass) {
/***/ }),
-/* 203 */
+/* 204 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var url = __webpack_require__(24)
- , equal = __webpack_require__(204)
- , util = __webpack_require__(106)
+ , equal = __webpack_require__(205)
+ , util = __webpack_require__(107)
, SchemaObject = __webpack_require__(339)
, traverse = __webpack_require__(503);
@@ -47523,7 +47697,7 @@ function resolveIds(schema) {
/***/ }),
-/* 204 */
+/* 205 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47585,7 +47759,7 @@ module.exports = function equal(a, b) {
/***/ }),
-/* 205 */
+/* 206 */
/***/ (function(module, exports) {
// Copyright 2011 Mark Cavage All rights reserved.
@@ -47604,7 +47778,7 @@ module.exports = {
/***/ }),
-/* 206 */
+/* 207 */
/***/ (function(module, exports) {
// Copyright 2011 Mark Cavage All rights reserved.
@@ -47646,7 +47820,7 @@ module.exports = {
/***/ }),
-/* 207 */
+/* 208 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47926,7 +48100,7 @@ function hasWrapper(commander, args) {
const requireLockfile = exports.requireLockfile = true;
/***/ }),
-/* 208 */
+/* 209 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -47940,7 +48114,7 @@ exports.integrityErrors = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -47958,7 +48132,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _misc;
@@ -47970,7 +48144,7 @@ function _load_misc() {
var _packageNameUtils;
function _load_packageNameUtils() {
- return _packageNameUtils = __webpack_require__(222);
+ return _packageNameUtils = __webpack_require__(223);
}
var _workspaceLayout;
@@ -48548,7 +48722,7 @@ class InstallationIntegrityChecker {
exports.default = InstallationIntegrityChecker;
/***/ }),
-/* 209 */
+/* 210 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48583,13 +48757,13 @@ function _load_misc() {
var _yarnVersion;
function _load_yarnVersion() {
- return _yarnVersion = __webpack_require__(120);
+ return _yarnVersion = __webpack_require__(105);
}
var _semver;
function _load_semver() {
- return _semver = __webpack_require__(224);
+ return _semver = __webpack_require__(170);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -48720,9 +48894,7 @@ function checkOne(info, config, ignoreEngines) {
ref.ignore = true;
ref.incompatible = true;
- reporter.info(`${human}: ${msg}`);
if (!didIgnore) {
- reporter.info(reporter.lang('optionalCompatibilityExcluded', human));
didIgnore = true;
}
} else {
@@ -48817,7 +48989,7 @@ function shouldCheck(manifest, options) {
}
/***/ }),
-/* 210 */
+/* 211 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -48950,13 +49122,13 @@ function _load_index() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _promise;
function _load_promise() {
- return _promise = _interopRequireWildcard(__webpack_require__(50));
+ return _promise = _interopRequireWildcard(__webpack_require__(51));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -49043,7 +49215,7 @@ function fetch(pkgs, config) {
}
/***/ }),
-/* 211 */
+/* 212 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -49096,7 +49268,7 @@ function _load_constants() {
var _promise;
function _load_promise() {
- return _promise = _interopRequireWildcard(__webpack_require__(50));
+ return _promise = _interopRequireWildcard(__webpack_require__(51));
}
var _normalizePattern2;
@@ -49114,7 +49286,7 @@ function _load_misc() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _mutex;
@@ -49126,7 +49298,7 @@ function _load_mutex() {
var _semver;
function _load_semver() {
- return _semver = __webpack_require__(224);
+ return _semver = __webpack_require__(170);
}
var _workspaceLayout;
@@ -49141,7 +49313,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const invariant = __webpack_require__(9);
-const cmdShim = __webpack_require__(201);
+const cmdShim = __webpack_require__(202);
const path = __webpack_require__(0);
const semver = __webpack_require__(22);
// Concurrency for creating bin links disabled because of the issue #1961
@@ -50183,7 +50355,7 @@ class PackageLinker {
exports.default = PackageLinker;
/***/ }),
-/* 212 */
+/* 213 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50205,7 +50377,7 @@ function _load_tty() {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const readline = __webpack_require__(197);
+const readline = __webpack_require__(198);
var _require = __webpack_require__(30);
@@ -50274,7 +50446,7 @@ function clearNthLine(stdout, n) {
}
/***/ }),
-/* 213 */
+/* 214 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50287,13 +50459,13 @@ Object.defineProperty(exports, "__esModule", {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = _interopRequireDefault(__webpack_require__(108));
+ return _baseReporter = _interopRequireDefault(__webpack_require__(109));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -50468,7 +50640,7 @@ class JSONReporter extends (_baseReporter || _load_baseReporter()).default {
exports.default = JSONReporter;
/***/ }),
-/* 214 */
+/* 215 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50616,7 +50788,7 @@ const shouldUpdateLockfile = exports.shouldUpdateLockfile = (lockfileEntry, reso
};
/***/ }),
-/* 215 */
+/* 216 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50648,7 +50820,7 @@ function _load_invariant() {
var _uuid;
function _load_uuid() {
- return _uuid = _interopRequireDefault(__webpack_require__(119));
+ return _uuid = _interopRequireDefault(__webpack_require__(120));
}
var _errors;
@@ -50672,7 +50844,7 @@ function _load_misc() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -50754,7 +50926,7 @@ FileResolver.protocol = 'file';
FileResolver.prefixMatcher = /^\.{1,2}\//;
/***/ }),
-/* 216 */
+/* 217 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50830,7 +51002,7 @@ exports.default = GistResolver;
GistResolver.protocol = 'gist';
/***/ }),
-/* 217 */
+/* 218 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50879,7 +51051,7 @@ function _load_map() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -50891,7 +51063,7 @@ function _load_constants() {
var _packageNameUtils;
function _load_packageNameUtils() {
- return _packageNameUtils = __webpack_require__(222);
+ return _packageNameUtils = __webpack_require__(223);
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -51119,7 +51291,7 @@ exports.default = NpmResolver;
NpmResolver.registry = NPM_REGISTRY_ID;
/***/ }),
-/* 218 */
+/* 219 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -51199,19 +51371,19 @@ let fixTimes = (() => {
var _fs;
function _load_fs() {
- return _fs = _interopRequireDefault(__webpack_require__(5));
+ return _fs = _interopRequireDefault(__webpack_require__(4));
}
var _promise;
function _load_promise() {
- return _promise = __webpack_require__(50);
+ return _promise = __webpack_require__(51);
}
var _fs2;
function _load_fs2() {
- return _fs2 = __webpack_require__(4);
+ return _fs2 = __webpack_require__(5);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -51317,7 +51489,7 @@ const copyWithBuffer = (() => {
};
/***/ }),
-/* 219 */
+/* 220 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -51336,7 +51508,7 @@ function _load_asyncToGenerator() {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _invariant;
@@ -51354,7 +51526,7 @@ function _load_string_decoder() {
var _tarFs;
function _load_tarFs() {
- return _tarFs = _interopRequireDefault(__webpack_require__(193));
+ return _tarFs = _interopRequireDefault(__webpack_require__(194));
}
var _tarStream;
@@ -51372,7 +51544,7 @@ function _load_url() {
var _fs;
function _load_fs() {
- return _fs = __webpack_require__(5);
+ return _fs = __webpack_require__(4);
}
var _errors;
@@ -51402,7 +51574,7 @@ function _load_crypto() {
var _fs2;
function _load_fs2() {
- return _fs2 = _interopRequireWildcard(__webpack_require__(4));
+ return _fs2 = _interopRequireWildcard(__webpack_require__(5));
}
var _map;
@@ -51961,7 +52133,7 @@ class Git {
exports.default = Git;
/***/ }),
-/* 220 */
+/* 221 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52048,7 +52220,7 @@ exports.default = (() => {
})();
/***/ }),
-/* 221 */
+/* 222 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52177,7 +52349,7 @@ function extractRepositoryUrl(repository) {
}
/***/ }),
-/* 222 */
+/* 223 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52201,7 +52373,7 @@ function getSystemParams() {
}
/***/ }),
-/* 223 */
+/* 224 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52228,139 +52400,6 @@ function isRootUser(uid) {
return uid === 0;
}
-/***/ }),
-/* 224 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.satisfiesWithPrereleases = satisfiesWithPrereleases;
-exports.diffWithUnstable = diffWithUnstable;
-
-var _semver;
-
-function _load_semver() {
- return _semver = _interopRequireDefault(__webpack_require__(22));
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Returns whether the given semver version satisfies the given range. Notably this supports
- * prerelease versions so that "2.0.0-rc.0" satisfies the range ">=1.0.0", for example.
- */
-
-function satisfiesWithPrereleases(version, range, loose = false) {
- let semverRange;
- try {
- // $FlowFixMe: Add a definition for the Range class
- semverRange = new (_semver || _load_semver()).default.Range(range, loose);
- } catch (err) {
- return false;
- }
-
- if (!version) {
- return false;
- }
- let semverVersion;
- try {
- semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose);
- } catch (err) {
- return false;
- }
-
- // A range has multiple sets of comparators. A version must satisfy all comparators in a set
- // and at least one set to satisfy the range.
- return semverRange.set.some(comparatorSet => {
- // node-semver converts ~ and ^ ranges into pairs of >= and < ranges but the upper bounds don't
- // properly exclude prerelease versions. For example, "^1.0.0" is converted to ">=1.0.0 <2.0.0",
- // which includes "2.0.0-pre" since prerelease versions are lower than their non-prerelease
- // counterparts. As a practical workaround we make upper-bound ranges exclude prereleases and
- // convert "<2.0.0" to "<2.0.0-0", for example.
- comparatorSet = comparatorSet.map(comparator => {
- if (comparator.operator !== '<' || !comparator.value || comparator.semver.prerelease.length) {
- return comparator;
- }
-
- // "0" is the lowest prerelease version
- comparator.semver.inc('pre', 0);
-
- const comparatorString = comparator.operator + comparator.semver.version;
- // $FlowFixMe: Add a definition for the Comparator class
- return new (_semver || _load_semver()).default.Comparator(comparatorString, comparator.loose);
- });
-
- return !comparatorSet.some(comparator => !comparator.test(semverVersion));
- });
-}
-
-const PRE_RELEASES = {
- major: 'premajor',
- minor: 'preminor',
- patch: 'prepatch'
-};
-
-/**
- * Returns the difference between two versions as a semantic string representation.
- * Similar to the `diff` method in node-semver, but it also accounts for unstable versions,
- * like 0.x.x or 0.0.x.
- */
-
-function diffWithUnstable(version1, version2) {
- if ((_semver || _load_semver()).default.eq(version1, version2) === false) {
- const v1 = (_semver || _load_semver()).default.parse(version1);
- const v2 = (_semver || _load_semver()).default.parse(version2);
-
- if (v1 != null && v2 != null) {
- const isPreRelease = v1.prerelease.length > 0 || v2.prerelease.length > 0;
- const preMajor = v1.major === 0 || v2.major === 0;
- const preMinor = preMajor && (v1.minor === 0 || v2.minor === 0);
-
- let diff = null;
-
- if (v1.major !== v2.major) {
- diff = 'major';
- } else if (v1.minor !== v2.minor) {
- if (preMajor) {
- // If the major version number is zero (0.x.x), treat a change
- // of the minor version number as a major change.
- diff = 'major';
- } else {
- diff = 'minor';
- }
- } else if (v1.patch !== v2.patch) {
- if (preMinor) {
- // If the major & minor version numbers are zero (0.0.x), treat a change
- // of the patch version number as a major change.
- diff = 'major';
- } else if (preMajor) {
- // If the major version number is zero (0.x.x), treat a change
- // of the patch version number as a minor change.
- diff = 'minor';
- } else {
- diff = 'patch';
- }
- }
-
- if (isPreRelease) {
- if (diff != null) {
- diff = PRE_RELEASES[diff];
- } else {
- diff = 'prerelease';
- }
- }
-
- return diff;
- }
- }
-
- return null;
-}
-
/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {
@@ -52984,7 +53023,7 @@ exports.RETURN = RETURN;
/* 238 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = !__webpack_require__(51) && !__webpack_require__(112)(function () {
+module.exports = !__webpack_require__(52) && !__webpack_require__(113)(function () {
return Object.defineProperty(__webpack_require__(92)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
@@ -53016,8 +53055,8 @@ module.exports = function (fn, args, that) {
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
-var Iterators = __webpack_require__(53);
-var ITERATOR = __webpack_require__(20)('iterator');
+var Iterators = __webpack_require__(54);
+var ITERATOR = __webpack_require__(21)('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
@@ -53055,7 +53094,7 @@ var setToStringTag = __webpack_require__(95);
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-__webpack_require__(42)(IteratorPrototype, __webpack_require__(20)('iterator'), function () { return this; });
+__webpack_require__(42)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
@@ -53067,7 +53106,7 @@ module.exports = function (Constructor, NAME, next) {
/* 243 */
/***/ (function(module, exports, __webpack_require__) {
-var ITERATOR = __webpack_require__(20)('iterator');
+var ITERATOR = __webpack_require__(21)('iterator');
var SAFE_CLOSING = false;
try {
@@ -53228,9 +53267,9 @@ module.exports = Object.create || function create(O, Properties) {
var dP = __webpack_require__(72);
var anObject = __webpack_require__(35);
-var getKeys = __webpack_require__(171);
+var getKeys = __webpack_require__(172);
-module.exports = __webpack_require__(51) ? Object.defineProperties : function defineProperties(O, Properties) {
+module.exports = __webpack_require__(52) ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = getKeys(Properties);
var length = keys.length;
@@ -53247,7 +53286,7 @@ module.exports = __webpack_require__(51) ? Object.defineProperties : function de
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(71);
-var toObject = __webpack_require__(172);
+var toObject = __webpack_require__(173);
var IE_PROTO = __webpack_require__(96)('IE_PROTO');
var ObjectProto = Object.prototype;
@@ -53312,8 +53351,8 @@ module.exports = __webpack_require__(42);
var global = __webpack_require__(17);
var core = __webpack_require__(31);
var dP = __webpack_require__(72);
-var DESCRIPTORS = __webpack_require__(51);
-var SPECIES = __webpack_require__(20)('species');
+var DESCRIPTORS = __webpack_require__(52);
+var SPECIES = __webpack_require__(21)('species');
module.exports = function (KEY) {
var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
@@ -53365,7 +53404,7 @@ module.exports = function (index, length) {
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = __webpack_require__(52);
+var isObject = __webpack_require__(53);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
@@ -53393,8 +53432,8 @@ module.exports = navigator && navigator.userAgent || '';
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(126);
-var ITERATOR = __webpack_require__(20)('iterator');
-var Iterators = __webpack_require__(53);
+var ITERATOR = __webpack_require__(21)('iterator');
+var Iterators = __webpack_require__(54);
module.exports = __webpack_require__(31).getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
@@ -53410,7 +53449,7 @@ module.exports = __webpack_require__(31).getIteratorMethod = function (it) {
var addToUnscopables = __webpack_require__(234);
var step = __webpack_require__(244);
-var Iterators = __webpack_require__(53);
+var Iterators = __webpack_require__(54);
var toIObject = __webpack_require__(98);
// 22.1.3.4 Array.prototype.entries()
@@ -53460,7 +53499,7 @@ var global = __webpack_require__(17);
var ctx = __webpack_require__(70);
var classof = __webpack_require__(126);
var $export = __webpack_require__(60);
-var isObject = __webpack_require__(52);
+var isObject = __webpack_require__(53);
var aFunction = __webpack_require__(68);
var anInstance = __webpack_require__(235);
var forOf = __webpack_require__(237);
@@ -53486,7 +53525,7 @@ var USE_NATIVE = !!function () {
try {
// correct subclassing with @@species support
var promise = $Promise.resolve(1);
- var FakePromise = (promise.constructor = {})[__webpack_require__(20)('species')] = function (exec) {
+ var FakePromise = (promise.constructor = {})[__webpack_require__(21)('species')] = function (exec) {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -53819,8 +53858,8 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) {
__webpack_require__(258);
var global = __webpack_require__(17);
var hide = __webpack_require__(42);
-var Iterators = __webpack_require__(53);
-var TO_STRING_TAG = __webpack_require__(20)('toStringTag');
+var Iterators = __webpack_require__(54);
+var TO_STRING_TAG = __webpack_require__(21)('toStringTag');
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
@@ -61265,7 +61304,7 @@ module.exports = Object.assign(fn, figures);
var pathModule = __webpack_require__(0);
var isWindows = process.platform === 'win32';
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
// JavaScript implementation of realpath, ported from node pre-v6
@@ -61554,7 +61593,7 @@ exports.realpath = function realpath(p, cache, cb) {
module.exports = globSync
globSync.GlobSync = GlobSync
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var rp = __webpack_require__(140)
var minimatch = __webpack_require__(82)
var Minimatch = minimatch.Minimatch
@@ -62164,7 +62203,7 @@ var inquirer = module.exports;
inquirer.prompts = {};
-inquirer.Separator = __webpack_require__(175);
+inquirer.Separator = __webpack_require__(176);
inquirer.ui = {
BottomBar: __webpack_require__(695),
@@ -62295,7 +62334,7 @@ module.exports.Schema = __webpack_require__(44);
module.exports.FAILSAFE_SCHEMA = __webpack_require__(100);
module.exports.JSON_SCHEMA = __webpack_require__(144);
module.exports.CORE_SCHEMA = __webpack_require__(143);
-module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(55);
+module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(56);
module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(73);
module.exports.load = loader.load;
module.exports.loadAll = loader.loadAll;
@@ -62303,11 +62342,11 @@ module.exports.safeLoad = loader.safeLoad;
module.exports.safeLoadAll = loader.safeLoadAll;
module.exports.dump = dumper.dump;
module.exports.safeDump = dumper.safeDump;
-module.exports.YAMLException = __webpack_require__(54);
+module.exports.YAMLException = __webpack_require__(55);
// Deprecated schema names from JS-YAML 2.0.x
module.exports.MINIMAL_SCHEMA = __webpack_require__(100);
-module.exports.SAFE_SCHEMA = __webpack_require__(55);
+module.exports.SAFE_SCHEMA = __webpack_require__(56);
module.exports.DEFAULT_SCHEMA = __webpack_require__(73);
// Deprecated functions from JS-YAML 1.x.x
@@ -62327,9 +62366,9 @@ module.exports.addConstructor = deprecated('addConstructor');
/*eslint-disable no-use-before-define*/
var common = __webpack_require__(43);
-var YAMLException = __webpack_require__(54);
+var YAMLException = __webpack_require__(55);
var DEFAULT_FULL_SCHEMA = __webpack_require__(73);
-var DEFAULT_SAFE_SCHEMA = __webpack_require__(55);
+var DEFAULT_SAFE_SCHEMA = __webpack_require__(56);
var _toString = Object.prototype.toString;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -63161,9 +63200,9 @@ module.exports.safeDump = safeDump;
/*eslint-disable max-len,no-use-before-define*/
var common = __webpack_require__(43);
-var YAMLException = __webpack_require__(54);
+var YAMLException = __webpack_require__(55);
var Mark = __webpack_require__(283);
-var DEFAULT_SAFE_SCHEMA = __webpack_require__(55);
+var DEFAULT_SAFE_SCHEMA = __webpack_require__(56);
var DEFAULT_FULL_SCHEMA = __webpack_require__(73);
@@ -65925,9 +65964,9 @@ utils.unique = __webpack_require__(756);
utils.braces = __webpack_require__(757);
utils.brackets = __webpack_require__(639);
utils.extglob = __webpack_require__(644);
-utils.isExtglob = __webpack_require__(177);
-utils.isGlob = __webpack_require__(178);
-utils.typeOf = __webpack_require__(179);
+utils.isExtglob = __webpack_require__(178);
+utils.isGlob = __webpack_require__(179);
+utils.typeOf = __webpack_require__(180);
utils.normalize = __webpack_require__(765);
utils.omit = __webpack_require__(769);
utils.parseGlob = __webpack_require__(773);
@@ -66763,7 +66802,7 @@ rimraf.sync = rimrafSync
var assert = __webpack_require__(28)
var path = __webpack_require__(0)
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var glob = __webpack_require__(99)
var _0666 = parseInt('666', 8)
@@ -67135,7 +67174,7 @@ function rmkidsSync (p, options) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_queue__ = __webpack_require__(439);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__operators_observeOn__ = __webpack_require__(434);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_ObjectUnsubscribedError__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_ObjectUnsubscribedError__ = __webpack_require__(190);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubjectSubscription__ = __webpack_require__(422);
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
@@ -67729,7 +67768,7 @@ var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119);
/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
@@ -68180,7 +68219,7 @@ function hostReportError(err) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = pipe;
/* harmony export (immutable) */ __webpack_exports__["b"] = pipeFromArray;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(191);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(192);
/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
function pipe() {
@@ -69595,7 +69634,7 @@ function _load_link() {
var _login;
function _load_login() {
- return _login = _interopRequireWildcard(__webpack_require__(107));
+ return _login = _interopRequireWildcard(__webpack_require__(108));
}
var _logout;
@@ -69685,7 +69724,7 @@ function _load_unlink() {
var _upgrade;
function _load_upgrade() {
- return _upgrade = _interopRequireWildcard(__webpack_require__(207));
+ return _upgrade = _interopRequireWildcard(__webpack_require__(208));
}
var _version;
@@ -69821,7 +69860,7 @@ exports.getRcArgs = getRcArgs;
var _fs;
function _load_fs() {
- return _fs = __webpack_require__(5);
+ return _fs = __webpack_require__(4);
}
var _path;
@@ -70081,7 +70120,7 @@ var spawn = __webpack_require__(331).spawn;
var path = __webpack_require__(0);
var dirname = path.dirname;
var basename = path.basename;
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
/**
* Inherit `Command` from `EventEmitter.prototype`.
@@ -71312,7 +71351,7 @@ function exists(file) {
"use strict";
-var util = __webpack_require__(106);
+var util = __webpack_require__(107);
module.exports = SchemaObject;
@@ -72602,7 +72641,7 @@ exports.hasWrapper = hasWrapper;
var _promise;
function _load_promise() {
- return _promise = __webpack_require__(50);
+ return _promise = __webpack_require__(51);
}
var _hoistedTreeBuilder;
@@ -72637,7 +72676,7 @@ function _load_constants() {
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const zlib = __webpack_require__(198);
+const zlib = __webpack_require__(199);
const gzip = (0, (_promise || _load_promise()).promisify)(zlib.gzip);
@@ -73087,7 +73126,7 @@ exports.hasWrapper = hasWrapper;
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _filter;
@@ -73105,7 +73144,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -73378,7 +73417,7 @@ function _load_buildSubCommands() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -73387,7 +73426,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
-const micromatch = __webpack_require__(114);
+const micromatch = __webpack_require__(115);
function hasWrapper(flags, args) {
return args[0] !== 'dir';
@@ -73895,13 +73934,13 @@ function _load_errors() {
var _integrityChecker;
function _load_integrityChecker() {
- return _integrityChecker = _interopRequireDefault(__webpack_require__(208));
+ return _integrityChecker = _interopRequireDefault(__webpack_require__(209));
}
var _integrityChecker2;
function _load_integrityChecker2() {
- return _integrityChecker2 = __webpack_require__(208);
+ return _integrityChecker2 = __webpack_require__(209);
}
var _lockfile;
@@ -73913,7 +73952,7 @@ function _load_lockfile() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _install;
@@ -74078,7 +74117,7 @@ function _load_errors() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _global;
@@ -74093,7 +74132,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const invariant = __webpack_require__(9);
-const cmdShim = __webpack_require__(201);
+const cmdShim = __webpack_require__(202);
const path = __webpack_require__(0);
function hasWrapper(commander, args) {
@@ -74378,7 +74417,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const invariant = __webpack_require__(9);
-const micromatch = __webpack_require__(114);
+const micromatch = __webpack_require__(115);
const requireLockfile = exports.requireLockfile = true;
@@ -74469,7 +74508,7 @@ exports.run = exports.requireLockfile = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -74622,7 +74661,7 @@ function _load_lockfile() {
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _install;
@@ -74640,13 +74679,13 @@ function _load_errors() {
var _index2;
function _load_index2() {
- return _index2 = __webpack_require__(200);
+ return _index2 = __webpack_require__(201);
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -75008,7 +75047,7 @@ exports.hasWrapper = hasWrapper;
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = __webpack_require__(111);
+ return _executeLifecycleScript = __webpack_require__(112);
}
var _dynamicRequire;
@@ -75032,13 +75071,13 @@ function _load_errors() {
var _packageCompatibility;
function _load_packageCompatibility() {
- return _packageCompatibility = __webpack_require__(209);
+ return _packageCompatibility = __webpack_require__(210);
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -75212,7 +75251,7 @@ function _load_buildSubCommands() {
var _login;
function _load_login() {
- return _login = __webpack_require__(107);
+ return _login = __webpack_require__(108);
}
var _npmRegistry;
@@ -75342,7 +75381,7 @@ exports.run = exports.requireLockfile = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -75577,7 +75616,7 @@ function _load_add() {
var _upgrade;
function _load_upgrade() {
- return _upgrade = __webpack_require__(207);
+ return _upgrade = __webpack_require__(208);
}
var _colorForVersions;
@@ -75839,13 +75878,13 @@ exports.hasWrapper = hasWrapper;
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = __webpack_require__(111);
+ return _executeLifecycleScript = __webpack_require__(112);
}
var _errors;
@@ -75863,7 +75902,7 @@ function _load_gitSpawn() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _map;
@@ -75920,7 +75959,7 @@ exports.LocalTarballFetcher = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -75950,7 +75989,7 @@ function _load_baseFetcher() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _misc;
@@ -75971,9 +76010,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const crypto = __webpack_require__(11);
const path = __webpack_require__(0);
-const tarFs = __webpack_require__(193);
+const tarFs = __webpack_require__(194);
const url = __webpack_require__(24);
-const fs = __webpack_require__(5);
+const fs = __webpack_require__(4);
const stream = __webpack_require__(23);
const gunzip = __webpack_require__(656);
const invariant = __webpack_require__(9);
@@ -76063,7 +76102,7 @@ class TarballFetcher extends (_baseFetcher || _load_baseFetcher()).default {
const now = new Date();
- const fs = __webpack_require__(5);
+ const fs = __webpack_require__(4);
const patchedFs = Object.assign({}, fs, {
utimes: (path, atime, mtime, cb) => {
fs.stat(path, (err, stat) => {
@@ -76533,7 +76572,7 @@ function _load_requestManager() {
var _blockingQueue;
function _load_blockingQueue() {
- return _blockingQueue = _interopRequireDefault(__webpack_require__(110));
+ return _blockingQueue = _interopRequireDefault(__webpack_require__(111));
}
var _lockfile;
@@ -76557,13 +76596,13 @@ function _load_workspaceLayout() {
var _resolutionMap;
function _load_resolutionMap() {
- return _resolutionMap = _interopRequireDefault(__webpack_require__(214));
+ return _resolutionMap = _interopRequireDefault(__webpack_require__(215));
}
var _resolutionMap2;
function _load_resolutionMap2() {
- return _resolutionMap2 = __webpack_require__(214);
+ return _resolutionMap2 = __webpack_require__(215);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -77437,7 +77476,7 @@ Object.defineProperty(exports, "__esModule", {
var _hostedGitResolver;
function _load_hostedGitResolver() {
- return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109));
+ return _hostedGitResolver = _interopRequireDefault(__webpack_require__(110));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -77515,7 +77554,7 @@ function _load_misc() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -77592,7 +77631,7 @@ function _load_semver() {
var _semver2;
function _load_semver2() {
- return _semver2 = __webpack_require__(224);
+ return _semver2 = __webpack_require__(170);
}
var _constants;
@@ -77658,7 +77697,7 @@ function _load_misc() {
return _misc = __webpack_require__(18);
}
-const mm = __webpack_require__(114);
+const mm = __webpack_require__(115);
const path = __webpack_require__(0);
const WHITESPACE_RE = /^\s+$/;
@@ -77894,7 +77933,7 @@ exports.spawn = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _path;
@@ -77906,7 +77945,7 @@ function _load_path() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -78073,7 +78112,7 @@ Object.defineProperty(exports, "__esModule", {
var _fs;
function _load_fs() {
- return _fs = _interopRequireDefault(__webpack_require__(5));
+ return _fs = _interopRequireDefault(__webpack_require__(4));
}
var _http;
@@ -78115,7 +78154,7 @@ function _load_errors() {
var _blockingQueue;
function _load_blockingQueue() {
- return _blockingQueue = _interopRequireDefault(__webpack_require__(110));
+ return _blockingQueue = _interopRequireDefault(__webpack_require__(111));
}
var _constants;
@@ -80894,7 +80933,7 @@ CombinedStream.prototype._emitError = function(err) {
/***/ (function(module, exports, __webpack_require__) {
var stream = __webpack_require__(102)
-var eos = __webpack_require__(173)
+var eos = __webpack_require__(174)
var inherits = __webpack_require__(61)
var shift = __webpack_require__(942)
@@ -81285,7 +81324,7 @@ module.exports = function (data, opts) {
"use strict";
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
module.exports = clone(fs)
@@ -81310,7 +81349,7 @@ function clone (obj) {
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
var polyfills = __webpack_require__(655)
var legacy = __webpack_require__(654)
var queue = []
@@ -81699,7 +81738,7 @@ module.exports = InputPrompt;
var _ = __webpack_require__(38);
var MuteStream = __webpack_require__(401);
-var readline = __webpack_require__(197);
+var readline = __webpack_require__(198);
/**
* Base interface class other can inherits from
@@ -82713,7 +82752,7 @@ module.exports = {
/**/
-var pna = __webpack_require__(180);
+var pna = __webpack_require__(181);
/**/
module.exports = Readable;
@@ -82754,7 +82793,7 @@ function _isUint8Array(obj) {
/**/
/**/
-var util = __webpack_require__(113);
+var util = __webpack_require__(114);
util.inherits = __webpack_require__(61);
/**/
@@ -82789,7 +82828,7 @@ function prependListener(emitter, event, fn) {
}
function ReadableState(options, stream) {
- Duplex = Duplex || __webpack_require__(115);
+ Duplex = Duplex || __webpack_require__(116);
options = options || {};
@@ -82866,7 +82905,7 @@ function ReadableState(options, stream) {
}
function Readable(options) {
- Duplex = Duplex || __webpack_require__(115);
+ Duplex = Duplex || __webpack_require__(116);
if (!(this instanceof Readable)) return new Readable(options);
@@ -83780,10 +83819,10 @@ function indexOf(xs, x) {
module.exports = Transform;
-var Duplex = __webpack_require__(115);
+var Duplex = __webpack_require__(116);
/**/
-var util = __webpack_require__(113);
+var util = __webpack_require__(114);
util.inherits = __webpack_require__(61);
/**/
@@ -83962,7 +84001,7 @@ function done(stream, er, data) {
/**/
-var pna = __webpack_require__(180);
+var pna = __webpack_require__(181);
/**/
module.exports = Writable;
@@ -83999,7 +84038,7 @@ var Duplex;
Writable.WritableState = WritableState;
/**/
-var util = __webpack_require__(113);
+var util = __webpack_require__(114);
util.inherits = __webpack_require__(61);
/**/
@@ -84033,7 +84072,7 @@ util.inherits(Writable, Stream);
function nop() {}
function WritableState(options, stream) {
- Duplex = Duplex || __webpack_require__(115);
+ Duplex = Duplex || __webpack_require__(116);
options = options || {};
@@ -84183,7 +84222,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
}
function Writable(options) {
- Duplex = Duplex || __webpack_require__(115);
+ Duplex = Duplex || __webpack_require__(116);
// Writable ctor is applied to Duplexes, too.
// `realHasInstance` is necessary because using plain `instanceof`
@@ -84630,7 +84669,7 @@ Writable.prototype._destroy = function (err, cb) {
/**/
-var pna = __webpack_require__(180);
+var pna = __webpack_require__(181);
/**/
// undocumented cb() API, needed for core, not for public API
@@ -85111,7 +85150,7 @@ module.exports = function () {
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(0);
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var parse = path.parse || __webpack_require__(774);
module.exports = function nodeModulesPaths(start, opts) {
@@ -85165,7 +85204,7 @@ module.exports = function nodeModulesPaths(start, opts) {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BehaviorSubject; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__ = __webpack_require__(190);
/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
@@ -85217,7 +85256,7 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(186);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(323);
/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
@@ -85513,7 +85552,7 @@ function merge() {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NEVER; });
/* harmony export (immutable) */ __webpack_exports__["a"] = never;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_noop__ = __webpack_require__(191);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_noop__ = __webpack_require__(192);
/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
@@ -85625,7 +85664,7 @@ var RaceSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = timer;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(191);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(49);
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
@@ -85677,7 +85716,7 @@ function dispatch(state) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = audit;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14);
@@ -85790,7 +85829,7 @@ function concatMap(project, resultSelector) {
/* harmony export (immutable) */ __webpack_exports__["a"] = distinctUntilChanged;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
@@ -86131,7 +86170,7 @@ var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
/* unused harmony export ObserveOnMessage */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(185);
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -86211,7 +86250,7 @@ var ObserveOnMessage = /*@__PURE__*/ (function () {
/* harmony export (immutable) */ __webpack_exports__["a"] = tap;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(191);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(192);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(154);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
@@ -86607,7 +86646,7 @@ function isPromise(value) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPromise__ = __webpack_require__(445);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isObject__ = __webpack_require__(444);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(151);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(118);
/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
@@ -86716,7 +86755,7 @@ var subscribeToIterable = function (iterable) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToObservable; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(118);
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
var subscribeToObservable = function (obj) {
@@ -87176,7 +87215,7 @@ var utils = __webpack_require__(26);
var Key = __webpack_require__(27);
var PrivateKey = __webpack_require__(33);
-var sshpriv = __webpack_require__(192);
+var sshpriv = __webpack_require__(193);
/*JSSTYLED*/
var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/;
@@ -88831,7 +88870,7 @@ exports.default = handleSignals;
var _child;
function _load_child() {
- return _child = __webpack_require__(58);
+ return _child = __webpack_require__(50);
}
function forwardSignalAndExit(signal) {
@@ -89411,7 +89450,7 @@ module.exports = function (metaSchema, keywordsJsonPointers) {
var compileSchema = __webpack_require__(478)
- , resolve = __webpack_require__(203)
+ , resolve = __webpack_require__(204)
, Cache = __webpack_require__(474)
, SchemaObject = __webpack_require__(339)
, stableStringify = __webpack_require__(389)
@@ -89419,7 +89458,7 @@ var compileSchema = __webpack_require__(478)
, rules = __webpack_require__(479)
, $dataMetaSchema = __webpack_require__(472)
, patternGroups = __webpack_require__(500)
- , util = __webpack_require__(106)
+ , util = __webpack_require__(107)
, co = __webpack_require__(383);
module.exports = Ajv;
@@ -89443,7 +89482,7 @@ Ajv.prototype.addKeyword = customKeyword.add;
Ajv.prototype.getKeyword = customKeyword.get;
Ajv.prototype.removeKeyword = customKeyword.remove;
-var errorClasses = __webpack_require__(202);
+var errorClasses = __webpack_require__(203);
Ajv.ValidationError = errorClasses.Validation;
Ajv.MissingRefError = errorClasses.MissingRef;
Ajv.$dataMetaSchema = $dataMetaSchema;
@@ -89990,7 +90029,7 @@ module.exports = {
"use strict";
-var MissingRefError = __webpack_require__(202).MissingRef;
+var MissingRefError = __webpack_require__(203).MissingRef;
module.exports = compileAsync;
@@ -90087,7 +90126,7 @@ function compileAsync(schema, meta, callback) {
"use strict";
-var util = __webpack_require__(106);
+var util = __webpack_require__(107);
var DATE = /^\d\d\d\d-(\d\d)-(\d\d)$/;
var DAYS = [0,31,29,31,30,31,30,31,31,30,31,30,31];
@@ -90229,9 +90268,9 @@ function regex(str) {
"use strict";
-var resolve = __webpack_require__(203)
- , util = __webpack_require__(106)
- , errorClasses = __webpack_require__(202)
+var resolve = __webpack_require__(204)
+ , util = __webpack_require__(107)
+ , errorClasses = __webpack_require__(203)
, stableStringify = __webpack_require__(389);
var validateGenerator = __webpack_require__(344);
@@ -90242,7 +90281,7 @@ var validateGenerator = __webpack_require__(344);
var co = __webpack_require__(383);
var ucs2length = util.ucs2length;
-var equal = __webpack_require__(204);
+var equal = __webpack_require__(205);
// this error is thrown by async schemas to return validation errors via exception
var ValidationError = errorClasses.Validation;
@@ -90617,7 +90656,7 @@ function vars(arr, statement) {
var ruleModules = __webpack_require__(475)
- , toHash = __webpack_require__(106).toHash;
+ , toHash = __webpack_require__(107).toHash;
module.exports = function rules() {
var RULES = [
@@ -94183,8 +94222,8 @@ function requestFlush() {
// Copyright 2011 Mark Cavage All rights reserved.
-var errors = __webpack_require__(205);
-var types = __webpack_require__(206);
+var errors = __webpack_require__(206);
+var types = __webpack_require__(207);
var Reader = __webpack_require__(515);
var Writer = __webpack_require__(516);
@@ -94219,8 +94258,8 @@ for (var e in errors) {
var assert = __webpack_require__(28);
var Buffer = __webpack_require__(15).Buffer;
-var ASN1 = __webpack_require__(206);
-var errors = __webpack_require__(205);
+var ASN1 = __webpack_require__(207);
+var errors = __webpack_require__(206);
// --- Globals
@@ -94486,8 +94525,8 @@ module.exports = Reader;
var assert = __webpack_require__(28);
var Buffer = __webpack_require__(15).Buffer;
-var ASN1 = __webpack_require__(206);
-var errors = __webpack_require__(205);
+var ASN1 = __webpack_require__(207);
+var errors = __webpack_require__(206);
// --- Globals
@@ -95141,7 +95180,7 @@ module.exports.canonicalizeResource = canonicalizeResource
var aws4 = exports,
url = __webpack_require__(24),
- querystring = __webpack_require__(196),
+ querystring = __webpack_require__(197),
crypto = __webpack_require__(11),
lru = __webpack_require__(523),
credentialsCache = lru(1000)
@@ -95851,7 +95890,7 @@ function _load_asyncToGenerator() {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
let run = exports.run = (() => {
@@ -95903,19 +95942,19 @@ function _load_errors() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = __webpack_require__(111);
+ return _executeLifecycleScript = __webpack_require__(112);
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _global;
@@ -96019,13 +96058,13 @@ function _load_errors() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = __webpack_require__(111);
+ return _executeLifecycleScript = __webpack_require__(112);
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -96294,25 +96333,25 @@ function _load_baseResolver() {
var _hostedGitResolver;
function _load_hostedGitResolver() {
- return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109));
+ return _hostedGitResolver = _interopRequireDefault(__webpack_require__(110));
}
var _hostedGitResolver2;
function _load_hostedGitResolver2() {
- return _hostedGitResolver2 = __webpack_require__(109);
+ return _hostedGitResolver2 = __webpack_require__(110);
}
var _gistResolver;
function _load_gistResolver() {
- return _gistResolver = _interopRequireDefault(__webpack_require__(216));
+ return _gistResolver = _interopRequireDefault(__webpack_require__(217));
}
var _gistResolver2;
function _load_gistResolver2() {
- return _gistResolver2 = __webpack_require__(216);
+ return _gistResolver2 = __webpack_require__(217);
}
var _gitResolver;
@@ -96324,7 +96363,7 @@ function _load_gitResolver() {
var _fileResolver;
function _load_fileResolver() {
- return _fileResolver = _interopRequireDefault(__webpack_require__(215));
+ return _fileResolver = _interopRequireDefault(__webpack_require__(216));
}
var _packageResolver;
@@ -96348,19 +96387,19 @@ function _load_packageReference() {
var _packageFetcher;
function _load_packageFetcher() {
- return _packageFetcher = _interopRequireWildcard(__webpack_require__(210));
+ return _packageFetcher = _interopRequireWildcard(__webpack_require__(211));
}
var _packageLinker;
function _load_packageLinker() {
- return _packageLinker = _interopRequireDefault(__webpack_require__(211));
+ return _packageLinker = _interopRequireDefault(__webpack_require__(212));
}
var _packageCompatibility;
function _load_packageCompatibility() {
- return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209));
+ return _packageCompatibility = _interopRequireWildcard(__webpack_require__(210));
}
var _lockfile;
@@ -96384,7 +96423,7 @@ function _load_logicalDependencyTree() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _misc;
@@ -96411,7 +96450,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
-const uuid = __webpack_require__(119);
+const uuid = __webpack_require__(120);
const ssri = __webpack_require__(65);
const nodeVersion = process.versions.node.split('-')[0];
@@ -97008,20 +97047,28 @@ function _load_asyncToGenerator() {
let run = exports.run = (() => {
var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) {
const installVersion = flags[`2`] ? `berry` : flags.install;
+ const forwardedArgs = process.argv.slice(process.argv.indexOf('init', 2) + 1);
if (installVersion) {
- const lockfilePath = path.resolve(config.cwd, 'yarn.lock');
- if (!(yield (_fs || _load_fs()).exists(lockfilePath))) {
- yield (_fs || _load_fs()).writeFile(lockfilePath, '');
+ if (flags[`2`] && process.env.COREPACK_ROOT) {
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${flags.install || `stable`}`, `init`, ...forwardedArgs, `--install=self`], {
+ stdio: 'inherit',
+ cwd: config.cwd
+ });
+ } else {
+ const lockfilePath = path.resolve(config.cwd, 'yarn.lock');
+ if (!(yield (_fs || _load_fs()).exists(lockfilePath))) {
+ yield (_fs || _load_fs()).writeFile(lockfilePath, '');
+ }
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', installVersion, '--silent'], {
+ stdio: 'inherit',
+ cwd: config.cwd
+ });
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'init', ...forwardedArgs], {
+ stdio: 'inherit',
+ cwd: config.cwd
+ });
}
- yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'policies', 'set-version', installVersion, '--silent'], {
- stdio: 'inherit',
- cwd: config.cwd
- });
- yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [process.argv[1], 'init', ...(flags.yes ? ['-y'] : []), ...(flags.private ? ['-p'] : [])], {
- stdio: 'inherit',
- cwd: config.cwd
- });
return;
}
@@ -97256,13 +97303,13 @@ exports.hasWrapper = hasWrapper;
var _util;
function _load_util() {
- return _util = __webpack_require__(221);
+ return _util = __webpack_require__(222);
}
var _index;
function _load_index() {
- return _index = __webpack_require__(57);
+ return _index = __webpack_require__(58);
}
var _githubResolver;
@@ -97274,13 +97321,13 @@ function _load_githubResolver() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _validate;
@@ -97333,7 +97380,7 @@ exports.examples = exports.run = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -97484,7 +97531,7 @@ exports.setFlags = setFlags;
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = _interopRequireDefault(__webpack_require__(108));
+ return _baseReporter = _interopRequireDefault(__webpack_require__(109));
}
var _install;
@@ -97716,7 +97763,7 @@ exports.run = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -97756,13 +97803,13 @@ exports.hasWrapper = hasWrapper;
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -97800,7 +97847,7 @@ exports.run = exports.requireLockfile = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -98068,7 +98115,7 @@ function _load_tag() {
var _login;
function _load_login() {
- return _login = __webpack_require__(107);
+ return _login = __webpack_require__(108);
}
var _npmRegistry;
@@ -98176,6 +98223,12 @@ Object.defineProperty(exports, "__esModule", {
});
exports.examples = exports.setFlags = exports.run = undefined;
+var _extends2;
+
+function _load_extends() {
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
+}
+
var _asyncToGenerator2;
function _load_asyncToGenerator() {
@@ -98186,6 +98239,7 @@ let fetchReleases = (() => {
var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, { includePrereleases = false } = {}) {
const token = process.env.GITHUB_TOKEN;
const tokenUrlParameter = token ? `?access_token=${token}` : '';
+
const request = yield config.requestManager.request({
url: `https://api.github.com/repos/yarnpkg/yarn/releases${tokenUrlParameter}`,
json: true
@@ -98229,6 +98283,18 @@ let fetchReleases = (() => {
exports.hasWrapper = hasWrapper;
+var _yarnVersion;
+
+function _load_yarnVersion() {
+ return _yarnVersion = __webpack_require__(105);
+}
+
+var _child;
+
+function _load_child() {
+ return _child = _interopRequireWildcard(__webpack_require__(50));
+}
+
var _buildSubCommands2;
function _load_buildSubCommands() {
@@ -98244,7 +98310,7 @@ function _load_rc() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _lockfile;
@@ -98253,10 +98319,29 @@ function _load_lockfile() {
return _lockfile = __webpack_require__(19);
}
+var _semver;
+
+function _load_semver() {
+ return _semver = __webpack_require__(170);
+}
+
+var _constants;
+
+function _load_constants() {
+ return _constants = __webpack_require__(8);
+}
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/* eslint-disable max-len */
+
+const V2_NAMES = ['berry', 'stable', 'canary', 'v2', '2'];
+
+const isLocalFile = version => version.match(/^\.{0,2}[\\/]/) || path.isAbsolute(version);
+const isV2Version = version => (0, (_semver || _load_semver()).satisfiesWithPrereleases)(version, '>=2.0.0');
+
const chalk = __webpack_require__(30);
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
@@ -98282,32 +98367,73 @@ function hasWrapper(flags, args) {
var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('policies', {
setVersion(config, reporter, flags, args) {
return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
- let range = args[0] || 'latest';
- let allowRc = flags.rc;
+ const initialRange = args[0] || 'latest';
+ let range = initialRange;
- reporter.log(`Resolving ${chalk.yellow(range)} to a url...`);
+ let allowRc = flags.rc;
if (range === 'rc') {
- range = 'latest';
+ reporter.log(`${chalk.yellow(`Warning:`)} Your current Yarn binary is currently Yarn ${(_yarnVersion || _load_yarnVersion()).version}; to avoid potential breaking changes, 'set version rc' won't receive upgrades past the 1.22.x branch.\n To upgrade to the latest versions, run ${chalk.cyan(`yarn set version`)} ${chalk.yellow.underline(`canary`)} instead. Sorry for the inconvenience.\n`);
+
+ range = '*';
allowRc = true;
}
if (range === 'latest') {
+ reporter.log(`${chalk.yellow(`Warning:`)} Your current Yarn binary is currently Yarn ${(_yarnVersion || _load_yarnVersion()).version}; to avoid potential breaking changes, 'set version latest' won't receive upgrades past the 1.22.x branch.\n To upgrade to the latest versions, run ${chalk.cyan(`yarn set version`)} ${chalk.yellow.underline(`stable`)} instead. Sorry for the inconvenience.\n`);
+
+ range = '*';
+ }
+
+ if (range === 'classic') {
range = '*';
}
let bundleUrl;
let bundleVersion;
- let isV2 = false;
+ const isV2 = false;
if (range === 'nightly' || range === 'nightlies') {
+ reporter.log(`${chalk.yellow(`Warning:`)} Nightlies only exist for Yarn 1.x; starting from 2.x onwards, you should use 'canary' instead`);
+
bundleUrl = 'https://nightly.yarnpkg.com/latest.js';
bundleVersion = 'nightly';
- } else if (range === 'berry' || range === 'v2' || range === '2') {
- bundleUrl = 'https://github.com/yarnpkg/berry/raw/master/packages/berry-cli/bin/berry.js';
- bundleVersion = 'berry';
- isV2 = true;
+ } else if (V2_NAMES.includes(range) || isLocalFile(range) || isV2Version(range)) {
+ const normalizedRange = range === `canary` ? `canary` : `stable`;
+
+ if (process.env.COREPACK_ROOT) {
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${normalizedRange}`, `set`, `version`, normalizedRange], {
+ stdio: 'inherit',
+ cwd: config.cwd
+ });
+
+ return;
+ } else {
+ const bundle = yield fetchBundle(config, 'https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js');
+
+ const yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-stable-temp.cjs`);
+ yield (_fs || _load_fs()).mkdirp(path.dirname(yarnPath));
+ yield (_fs || _load_fs()).writeFile(yarnPath, bundle);
+ yield (_fs || _load_fs()).chmod(yarnPath, 0o755);
+
+ try {
+ yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [yarnPath, 'set', 'version', range], {
+ stdio: 'inherit',
+ cwd: config.lockfileFolder,
+ env: (0, (_extends2 || _load_extends()).default)({}, process.env, {
+ YARN_IGNORE_PATH: `1`
+ })
+ });
+ } catch (err) {
+ // eslint-disable-next-line no-process-exit
+ process.exit(1);
+ }
+
+ return;
+ }
} else {
+ reporter.log(`Resolving ${chalk.yellow(initialRange)} to a url...`);
+
let releases = [];
try {
@@ -98576,7 +98702,7 @@ function _load_version() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _pack;
@@ -98588,7 +98714,7 @@ function _load_pack() {
var _login;
function _load_login() {
- return _login = __webpack_require__(107);
+ return _login = __webpack_require__(108);
}
var _path;
@@ -98605,7 +98731,7 @@ const invariant = __webpack_require__(9);
const crypto = __webpack_require__(11);
const url = __webpack_require__(24);
-const fs2 = __webpack_require__(5);
+const fs2 = __webpack_require__(4);
const ssri = __webpack_require__(65);
function setFlags(commander) {
@@ -98635,7 +98761,7 @@ exports.examples = exports.hasWrapper = exports.run = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -98689,7 +98815,7 @@ function _load_buildSubCommands() {
var _login;
function _load_login() {
- return _login = __webpack_require__(107);
+ return _login = __webpack_require__(108);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -98957,7 +99083,7 @@ function _load_errors() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _link;
@@ -99147,7 +99273,7 @@ function _load_errors() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -99210,7 +99336,7 @@ exports.hasWrapper = hasWrapper;
var _yarnVersion;
function _load_yarnVersion() {
- return _yarnVersion = __webpack_require__(120);
+ return _yarnVersion = __webpack_require__(105);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -99514,7 +99640,7 @@ function _load_constants() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _lockfile;
@@ -99734,7 +99860,7 @@ function _load_errors() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _constants;
@@ -99936,7 +100062,7 @@ function _load_constants() {
var _child;
function _load_child() {
- return _child = _interopRequireWildcard(__webpack_require__(58));
+ return _child = _interopRequireWildcard(__webpack_require__(50));
}
var _constants2;
@@ -99993,7 +100119,7 @@ exports.autoRun = exports.main = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -100604,6 +100730,8 @@ let start = (() => {
// innermost process, whose end will cause our own to exit.
});
+ (0, (_signalHandler || _load_signalHandler()).default)();
+
try {
if (/\.[cm]?js$/.test(yarnPath)) {
exitCode = yield (0, (_child || _load_child()).spawnp)(process.execPath, [yarnPath, ...argv], opts);
@@ -100668,7 +100796,7 @@ function _load_commander() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireDefault(__webpack_require__(5));
+ return _fs = _interopRequireDefault(__webpack_require__(4));
}
var _invariant;
@@ -100704,13 +100832,13 @@ function _load_semver() {
var _index;
function _load_index() {
- return _index = __webpack_require__(200);
+ return _index = __webpack_require__(201);
}
var _index2;
function _load_index2() {
- return _index2 = __webpack_require__(57);
+ return _index2 = __webpack_require__(58);
}
var _index3;
@@ -100752,13 +100880,13 @@ function _load_rc() {
var _child;
function _load_child() {
- return _child = __webpack_require__(58);
+ return _child = __webpack_require__(50);
}
var _yarnVersion;
function _load_yarnVersion() {
- return _yarnVersion = __webpack_require__(120);
+ return _yarnVersion = __webpack_require__(105);
}
var _signalHandler;
@@ -100845,7 +100973,7 @@ function _load_baseFetcher() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -100899,13 +101027,13 @@ function _load_baseFetcher() {
var _git;
function _load_git() {
- return _git = _interopRequireDefault(__webpack_require__(219));
+ return _git = _interopRequireDefault(__webpack_require__(220));
}
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _constants;
@@ -100948,10 +101076,10 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const tarFs = __webpack_require__(193);
+const tarFs = __webpack_require__(194);
const url = __webpack_require__(24);
const path = __webpack_require__(0);
-const fs = __webpack_require__(5);
+const fs = __webpack_require__(4);
const invariant = __webpack_require__(9);
@@ -101279,7 +101407,7 @@ Object.defineProperty(exports, "__esModule", {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _asyncToGenerator2;
@@ -101291,7 +101419,7 @@ function _load_asyncToGenerator() {
var _packageFetcher;
function _load_packageFetcher() {
- return _packageFetcher = __webpack_require__(210);
+ return _packageFetcher = __webpack_require__(211);
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -101524,7 +101652,7 @@ exports.NohoistResolver = exports.HoistManifest = undefined;
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _config;
@@ -101542,7 +101670,7 @@ function _load_misc() {
var _micromatch;
function _load_micromatch() {
- return _micromatch = _interopRequireDefault(__webpack_require__(114));
+ return _micromatch = _interopRequireDefault(__webpack_require__(115));
}
var _workspaceLayout2;
@@ -102700,7 +102828,7 @@ function _load_config() {
var _executeLifecycleScript;
function _load_executeLifecycleScript() {
- return _executeLifecycleScript = _interopRequireDefault(__webpack_require__(111));
+ return _executeLifecycleScript = _interopRequireDefault(__webpack_require__(112));
}
var _crypto;
@@ -102712,13 +102840,13 @@ function _load_crypto() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _packageNameUtils;
function _load_packageNameUtils() {
- return _packageNameUtils = __webpack_require__(222);
+ return _packageNameUtils = __webpack_require__(223);
}
var _pack;
@@ -102731,7 +102859,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-const fs = __webpack_require__(5);
+const fs = __webpack_require__(4);
const invariant = __webpack_require__(9);
const path = __webpack_require__(0);
@@ -103287,7 +103415,7 @@ function _load_asyncToGenerator() {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _misc;
@@ -103503,13 +103631,13 @@ function _load_lockfile() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
var _yarnVersion;
function _load_yarnVersion() {
- return _yarnVersion = __webpack_require__(120);
+ return _yarnVersion = __webpack_require__(105);
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -103691,7 +103819,7 @@ Object.defineProperty(exports, "__esModule", {
var _jsonReporter;
function _load_jsonReporter() {
- return _jsonReporter = _interopRequireDefault(__webpack_require__(213));
+ return _jsonReporter = _interopRequireDefault(__webpack_require__(214));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -103744,7 +103872,7 @@ function _load_asyncToGenerator() {
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = _interopRequireDefault(__webpack_require__(108));
+ return _baseReporter = _interopRequireDefault(__webpack_require__(109));
}
var _progressBar;
@@ -103762,7 +103890,7 @@ function _load_spinnerProgress() {
var _util;
function _load_util() {
- return _util = __webpack_require__(212);
+ return _util = __webpack_require__(213);
}
var _misc;
@@ -103795,7 +103923,7 @@ var _require = __webpack_require__(3);
const inspect = _require.inspect;
-const readline = __webpack_require__(197);
+const readline = __webpack_require__(198);
const chalk = __webpack_require__(30);
const stripAnsi = __webpack_require__(329);
const read = __webpack_require__(790);
@@ -104451,7 +104579,7 @@ Object.defineProperty(exports, "__esModule", {
var _util;
function _load_util() {
- return _util = __webpack_require__(212);
+ return _util = __webpack_require__(213);
}
class ProgressBar {
@@ -104536,7 +104664,7 @@ Object.defineProperty(exports, "__esModule", {
var _util;
function _load_util() {
- return _util = __webpack_require__(212);
+ return _util = __webpack_require__(213);
}
class Spinner {
@@ -104598,7 +104726,7 @@ Object.defineProperty(exports, "__esModule", {
var _jsonReporter;
function _load_jsonReporter() {
- return _jsonReporter = _interopRequireDefault(__webpack_require__(213));
+ return _jsonReporter = _interopRequireDefault(__webpack_require__(214));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -105113,7 +105241,7 @@ function _load_asyncToGenerator() {
var _baseReporter;
function _load_baseReporter() {
- return _baseReporter = _interopRequireDefault(__webpack_require__(108));
+ return _baseReporter = _interopRequireDefault(__webpack_require__(109));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -105210,7 +105338,7 @@ Object.defineProperty(exports, "__esModule", {
var _extends2;
function _load_extends() {
- return _extends2 = _interopRequireDefault(__webpack_require__(21));
+ return _extends2 = _interopRequireDefault(__webpack_require__(20));
}
var _packageRequest;
@@ -105309,7 +105437,7 @@ function _load_asyncToGenerator() {
var _hostedGitResolver;
function _load_hostedGitResolver() {
- return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109));
+ return _hostedGitResolver = _interopRequireDefault(__webpack_require__(110));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -105372,7 +105500,7 @@ Object.defineProperty(exports, "__esModule", {
var _hostedGitResolver;
function _load_hostedGitResolver() {
- return _hostedGitResolver = _interopRequireDefault(__webpack_require__(109));
+ return _hostedGitResolver = _interopRequireDefault(__webpack_require__(110));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -105506,7 +105634,7 @@ function _load_crypto() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -105663,7 +105791,7 @@ Object.defineProperty(exports, "__esModule", {
var _npmResolver;
function _load_npmResolver() {
- return _npmResolver = _interopRequireDefault(__webpack_require__(217));
+ return _npmResolver = _interopRequireDefault(__webpack_require__(218));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -106167,7 +106295,7 @@ let generatePnpMap = exports.generatePnpMap = (() => {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -106841,7 +106969,7 @@ function _load_constants() {
var _util;
function _load_util() {
- return _util = __webpack_require__(221);
+ return _util = __webpack_require__(222);
}
var _index;
@@ -106859,7 +106987,7 @@ function _load_inferLicense() {
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -107491,7 +107619,7 @@ function _load_constants() {
var _fileResolver;
function _load_fileResolver() {
- return _fileResolver = __webpack_require__(215);
+ return _fileResolver = __webpack_require__(216);
}
var _linkResolver;
@@ -107623,7 +107751,7 @@ exports.makePortableProxyScript = makePortableProxyScript;
var _fs;
function _load_fs() {
- return _fs = _interopRequireWildcard(__webpack_require__(4));
+ return _fs = _interopRequireWildcard(__webpack_require__(5));
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -107653,7 +107781,7 @@ exports.findRc = findRc;
var _fs;
function _load_fs() {
- return _fs = __webpack_require__(5);
+ return _fs = __webpack_require__(4);
}
var _path;
@@ -108717,7 +108845,7 @@ module.exports = (chalk, tmp) => {
module.exports = chownr
chownr.sync = chownrSync
-var fs = __webpack_require__(5)
+var fs = __webpack_require__(4)
, path = __webpack_require__(0)
function chownr (p, uid, gid, cb) {
@@ -108833,7 +108961,7 @@ module.exports = __webpack_require__(605);
/* 603 */
/***/ (function(module, exports, __webpack_require__) {
-var kindOf = __webpack_require__(179);
+var kindOf = __webpack_require__(180);
var utils = __webpack_require__(382);
/**
@@ -109210,7 +109338,7 @@ module.exports.RowSpanCell = RowSpanCell;
/* 604 */
/***/ (function(module, exports, __webpack_require__) {
-var kindOf = __webpack_require__(179);
+var kindOf = __webpack_require__(180);
var objectAssign = __webpack_require__(303);
var Cell = __webpack_require__(603);
var RowSpanCell = Cell.RowSpanCell;
@@ -110749,15 +110877,15 @@ module.exports = __webpack_require__(31).Object.assign;
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
-var getKeys = __webpack_require__(171);
+var getKeys = __webpack_require__(172);
var gOPS = __webpack_require__(625);
var pIE = __webpack_require__(626);
-var toObject = __webpack_require__(172);
-var IObject = __webpack_require__(170);
+var toObject = __webpack_require__(173);
+var IObject = __webpack_require__(171);
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || __webpack_require__(112)(function () {
+module.exports = !$assign || __webpack_require__(113)(function () {
var A = {};
var B = {};
// eslint-disable-next-line no-undef
@@ -112629,7 +112757,7 @@ function length(val) {
-var typeOf = __webpack_require__(179);
+var typeOf = __webpack_require__(180);
module.exports = function isNumber(num) {
var type = typeOf(num);
@@ -112680,7 +112808,7 @@ module.exports = function isObject(val) {
* Module dependencies
*/
-var isExtglob = __webpack_require__(177);
+var isExtglob = __webpack_require__(178);
var re, cache = {};
/**
@@ -113086,7 +113214,7 @@ var util = __webpack_require__(3)
, Agent = __webpack_require__(87).Agent
, net = __webpack_require__(164)
, tls = __webpack_require__(467)
- , AgentSSL = __webpack_require__(195).Agent
+ , AgentSSL = __webpack_require__(196).Agent
function getConnectionName(host, port) {
var name = ''
@@ -113227,9 +113355,9 @@ var CombinedStream = __webpack_require__(385);
var util = __webpack_require__(3);
var path = __webpack_require__(0);
var http = __webpack_require__(87);
-var https = __webpack_require__(195);
+var https = __webpack_require__(196);
var parseUrl = __webpack_require__(24).parse;
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var mime = __webpack_require__(400);
var asynckit = __webpack_require__(517);
var populate = __webpack_require__(650);
@@ -113702,7 +113830,7 @@ module.exports = function(dst, src) {
/* 651 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(5).constants || __webpack_require__(466)
+module.exports = __webpack_require__(4).constants || __webpack_require__(466)
/***/ }),
@@ -113721,7 +113849,7 @@ module.exports = __webpack_require__(5).constants || __webpack_require__(466)
var path = __webpack_require__(0);
var parent = __webpack_require__(653);
-var isGlob = __webpack_require__(178);
+var isGlob = __webpack_require__(179);
module.exports = function globBase(pattern) {
if (typeof pattern !== 'string') {
@@ -113771,7 +113899,7 @@ function dirname(glob) {
var path = __webpack_require__(0);
-var isglob = __webpack_require__(178);
+var isglob = __webpack_require__(179);
module.exports = function globParent(str) {
str += 'a'; // preserves full path in case of trailing path separator
@@ -114244,7 +114372,7 @@ function chownErOk (er) {
/* 656 */
/***/ (function(module, exports, __webpack_require__) {
-var zlib = __webpack_require__(198)
+var zlib = __webpack_require__(199)
var peek = __webpack_require__(775)
var through = __webpack_require__(461)
var pumpify = __webpack_require__(782)
@@ -114635,7 +114763,7 @@ module.exports = function resolvePkg(name, dir) {
var parser = __webpack_require__(681);
var signer = __webpack_require__(682);
var verify = __webpack_require__(683);
-var utils = __webpack_require__(174);
+var utils = __webpack_require__(175);
@@ -114669,7 +114797,7 @@ module.exports = {
var assert = __webpack_require__(16);
var util = __webpack_require__(3);
-var utils = __webpack_require__(174);
+var utils = __webpack_require__(175);
@@ -114994,7 +115122,7 @@ var http = __webpack_require__(87);
var util = __webpack_require__(3);
var sshpk = __webpack_require__(328);
var jsprim = __webpack_require__(746);
-var utils = __webpack_require__(174);
+var utils = __webpack_require__(175);
var sprintf = __webpack_require__(3).format;
@@ -115398,7 +115526,7 @@ module.exports = {
var assert = __webpack_require__(16);
var crypto = __webpack_require__(11);
var sshpk = __webpack_require__(328);
-var utils = __webpack_require__(174);
+var utils = __webpack_require__(175);
var HASH_ALGOS = utils.HASH_ALGOS;
var PK_ALGOS = utils.PK_ALGOS;
@@ -115735,7 +115863,7 @@ module.exports = class Choice {
var assert = __webpack_require__(28);
var _ = __webpack_require__(38);
-var Separator = __webpack_require__(175);
+var Separator = __webpack_require__(176);
var Choice = __webpack_require__(685);
/**
@@ -115865,7 +115993,7 @@ var figures = __webpack_require__(270);
var { map, takeUntil } = __webpack_require__(63);
var Base = __webpack_require__(79);
var observe = __webpack_require__(80);
-var Paginator = __webpack_require__(176);
+var Paginator = __webpack_require__(177);
class CheckboxPrompt extends Base {
constructor(questions, rl, answers) {
@@ -116229,7 +116357,7 @@ var chalk = __webpack_require__(30);
var editAsync = __webpack_require__(709).editAsync;
var Base = __webpack_require__(79);
var observe = __webpack_require__(80);
-var { Subject } = __webpack_require__(182);
+var { Subject } = __webpack_require__(183);
class EditorPrompt extends Base {
/**
@@ -116336,9 +116464,9 @@ var _ = __webpack_require__(38);
var chalk = __webpack_require__(30);
var { map, takeUntil } = __webpack_require__(63);
var Base = __webpack_require__(79);
-var Separator = __webpack_require__(175);
+var Separator = __webpack_require__(176);
var observe = __webpack_require__(80);
-var Paginator = __webpack_require__(176);
+var Paginator = __webpack_require__(177);
class ExpandPrompt extends Base {
constructor(questions, rl, answers) {
@@ -116610,11 +116738,11 @@ var _ = __webpack_require__(38);
var chalk = __webpack_require__(30);
var figures = __webpack_require__(270);
var cliCursor = __webpack_require__(381);
-var runAsync = __webpack_require__(181);
+var runAsync = __webpack_require__(182);
var { flatMap, map, take, takeUntil } = __webpack_require__(63);
var Base = __webpack_require__(79);
var observe = __webpack_require__(80);
-var Paginator = __webpack_require__(176);
+var Paginator = __webpack_require__(177);
class ListPrompt extends Base {
constructor(questions, rl, answers) {
@@ -116950,9 +117078,9 @@ var _ = __webpack_require__(38);
var chalk = __webpack_require__(30);
var { map, takeUntil } = __webpack_require__(63);
var Base = __webpack_require__(79);
-var Separator = __webpack_require__(175);
+var Separator = __webpack_require__(176);
var observe = __webpack_require__(80);
-var Paginator = __webpack_require__(176);
+var Paginator = __webpack_require__(177);
class RawListPrompt extends Base {
constructor(questions, rl, answers) {
@@ -117237,9 +117365,9 @@ module.exports = BottomBar;
"use strict";
var _ = __webpack_require__(38);
-var { defer, empty, from, of } = __webpack_require__(182);
+var { defer, empty, from, of } = __webpack_require__(183);
var { concatMap, filter, publish, reduce } = __webpack_require__(63);
-var runAsync = __webpack_require__(181);
+var runAsync = __webpack_require__(182);
var utils = __webpack_require__(698);
var Base = __webpack_require__(393);
@@ -117512,8 +117640,8 @@ module.exports = ScreenManager;
"use strict";
var _ = __webpack_require__(38);
-var { from, of } = __webpack_require__(182);
-var runAsync = __webpack_require__(181);
+var { from, of } = __webpack_require__(183);
+var runAsync = __webpack_require__(182);
/**
* Resolve a question property value if it is passed as a function.
@@ -119320,7 +119448,7 @@ module.exports = function() {
/***/ (function(module, exports, __webpack_require__) {
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var utf8 = __webpack_require__(703),
unicode = __webpack_require__(702),
@@ -119671,7 +119799,7 @@ exports.RemoveFileError = RemoveFileError;
Object.defineProperty(exports, "__esModule", { value: true });
var chardet_1 = __webpack_require__(704);
var child_process_1 = __webpack_require__(331);
-var fs_1 = __webpack_require__(5);
+var fs_1 = __webpack_require__(4);
var iconv_lite_1 = __webpack_require__(726);
var tmp_1 = __webpack_require__(954);
var CreateFileError_1 = __webpack_require__(705);
@@ -128062,7 +128190,7 @@ var fs
try {
fs = __webpack_require__(391)
} catch(err) {
- fs = __webpack_require__(5)
+ fs = __webpack_require__(4)
}
var api = [
@@ -128673,7 +128801,7 @@ module.exports = Number.isNaN || function (x) {
/***/ (function(module, exports, __webpack_require__) {
var crypto = __webpack_require__(11)
- , qs = __webpack_require__(196)
+ , qs = __webpack_require__(197)
;
function sha1 (key, body) {
@@ -128975,9 +129103,9 @@ module.exports = function () {
-var isGlob = __webpack_require__(178);
+var isGlob = __webpack_require__(179);
var findBase = __webpack_require__(652);
-var extglob = __webpack_require__(177);
+var extglob = __webpack_require__(178);
var dotfile = __webpack_require__(733);
/**
@@ -130228,8 +130356,8 @@ exports.unquoted = unquoted;
/***/ (function(module, exports, __webpack_require__) {
var once = __webpack_require__(83)
-var eos = __webpack_require__(173)
-var fs = __webpack_require__(5) // we only need fs to get the ReadStream and WriteStream prototypes
+var eos = __webpack_require__(174)
+var fs = __webpack_require__(4) // we only need fs to get the ReadStream and WriteStream prototypes
var noop = function () {}
@@ -130380,8 +130508,8 @@ module.exports.ctor = define
/***/ (function(module, exports, __webpack_require__) {
var once = __webpack_require__(83)
-var eos = __webpack_require__(173)
-var fs = __webpack_require__(5) // we only need fs to get the ReadStream and WriteStream prototypes
+var eos = __webpack_require__(174)
+var fs = __webpack_require__(4) // we only need fs to get the ReadStream and WriteStream prototypes
var noop = function () {}
var ancient = /^v?\.0/.test(process.version)
@@ -131355,7 +131483,7 @@ function isBuffer(val) {
module.exports = read
-var readline = __webpack_require__(197)
+var readline = __webpack_require__(198)
var Mute = __webpack_require__(401)
function read (opts, cb) {
@@ -131511,7 +131639,7 @@ module.exports = PassThrough;
var Transform = __webpack_require__(407);
/**/
-var util = __webpack_require__(113);
+var util = __webpack_require__(114);
util.inherits = __webpack_require__(61);
/**/
@@ -131804,7 +131932,7 @@ module.exports = {"name":"request-capture-har","version":"1.2.2","description":"
/* 799 */
/***/ (function(module, exports, __webpack_require__) {
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var pkg = __webpack_require__(798);
function buildHarHeaders (headers) {
@@ -132118,7 +132246,7 @@ Object.defineProperty(request, 'debug', {
var caseless = __webpack_require__(231)
-var uuid = __webpack_require__(119)
+var uuid = __webpack_require__(120)
var helpers = __webpack_require__(305)
var md5 = helpers.md5
@@ -132377,8 +132505,8 @@ module.exports = getProxyFromURI
"use strict";
-var fs = __webpack_require__(5)
-var qs = __webpack_require__(196)
+var fs = __webpack_require__(4)
+var qs = __webpack_require__(197)
var validate = __webpack_require__(677)
var extend = __webpack_require__(269)
@@ -132685,7 +132813,7 @@ exports.header = function (uri, method, opts) {
"use strict";
-var uuid = __webpack_require__(119)
+var uuid = __webpack_require__(120)
var CombinedStream = __webpack_require__(385)
var isstream = __webpack_require__(399)
var Buffer = __webpack_require__(45).Buffer
@@ -132807,7 +132935,7 @@ exports.Multipart = Multipart
var url = __webpack_require__(24)
var qs = __webpack_require__(404)
var caseless = __webpack_require__(231)
-var uuid = __webpack_require__(119)
+var uuid = __webpack_require__(120)
var oauth = __webpack_require__(768)
var crypto = __webpack_require__(11)
var Buffer = __webpack_require__(45).Buffer
@@ -132960,7 +133088,7 @@ exports.OAuth = OAuth
var qs = __webpack_require__(404)
-var querystring = __webpack_require__(196)
+var querystring = __webpack_require__(197)
function Querystring (request) {
this.request = request
@@ -134976,11 +135104,11 @@ module.exports = {"author":{"name":"Jeremy Stashewsky","email":"jstashewsky@sale
var http = __webpack_require__(87)
-var https = __webpack_require__(195)
+var https = __webpack_require__(196)
var url = __webpack_require__(24)
var util = __webpack_require__(3)
var stream = __webpack_require__(23)
-var zlib = __webpack_require__(198)
+var zlib = __webpack_require__(199)
var aws2 = __webpack_require__(521)
var aws4 = __webpack_require__(522)
var httpSignature = __webpack_require__(680)
@@ -136540,7 +136668,7 @@ module.exports = async;
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(306);
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var path = __webpack_require__(0);
var caller = __webpack_require__(417);
var nodeModulesPaths = __webpack_require__(418);
@@ -136758,7 +136886,7 @@ module.exports = {"assert":true,"async_hooks":">= 8","buffer_ieee754":"< 0.9.7",
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(306);
-var fs = __webpack_require__(5);
+var fs = __webpack_require__(4);
var path = __webpack_require__(0);
var caller = __webpack_require__(417);
var nodeModulesPaths = __webpack_require__(418);
@@ -137176,7 +137304,7 @@ RetryOperation.prototype.mainError = function() {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_asap__ = __webpack_require__(438);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isNumeric__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isNumeric__ = __webpack_require__(191);
/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
@@ -137237,7 +137365,7 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = bindCallback;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isArray__ = __webpack_require__(41);
@@ -137356,7 +137484,7 @@ function dispatchError(state) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = bindNodeCallback;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49);
@@ -137756,7 +137884,7 @@ function fromIterable(input, scheduler) {
/* harmony export (immutable) */ __webpack_exports__["a"] = fromObservable;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_observable__ = __webpack_require__(118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToObservable__ = __webpack_require__(449);
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */
@@ -137829,7 +137957,7 @@ function fromPromise(input, scheduler) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = generate;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isScheduler__ = __webpack_require__(49);
/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
@@ -137989,7 +138117,7 @@ function iif(condition, trueResult, falseResult) {
/* harmony export (immutable) */ __webpack_exports__["a"] = interval;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(191);
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
@@ -138667,7 +138795,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = bufferWhen;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14);
@@ -138867,7 +138995,7 @@ function combineLatest() {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = concat;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_concat__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_concat__ = __webpack_require__(187);
/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
function concat() {
@@ -139131,7 +139259,7 @@ function dispatchNext(subscriber) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isDate__ = __webpack_require__(443);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Notification__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Notification__ = __webpack_require__(185);
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -139509,7 +139637,7 @@ function distinctUntilKeyChanged(key, compare) {
/* harmony export (immutable) */ __webpack_exports__["a"] = elementAt;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ArgumentOutOfRangeError__ = __webpack_require__(152);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throwIfEmpty__ = __webpack_require__(188);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throwIfEmpty__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__take__ = __webpack_require__(319);
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
@@ -139541,7 +139669,7 @@ function elementAt(index, defaultValue) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49);
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
@@ -139799,7 +139927,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
/* unused harmony export ExpandOperator */
/* unused harmony export ExpandSubscriber */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(14);
@@ -139971,8 +140099,8 @@ function findIndex(predicate, thisArg) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__take__ = __webpack_require__(319);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__throwIfEmpty__ = __webpack_require__(188);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__throwIfEmpty__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -140075,9 +140203,9 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(153);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__takeLast__ = __webpack_require__(320);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__throwIfEmpty__ = __webpack_require__(188);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__throwIfEmpty__ = __webpack_require__(189);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__defaultIfEmpty__ = __webpack_require__(146);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -140138,7 +140266,7 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = materialize;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(185);
/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -140185,7 +140313,7 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = max;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(187);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(188);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function max(comparer) {
@@ -140249,7 +140377,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) {
/* unused harmony export MergeScanOperator */
/* unused harmony export MergeScanSubscriber */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__(14);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13);
@@ -140359,7 +140487,7 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = min;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(187);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(188);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function min(comparer) {
@@ -140572,7 +140700,7 @@ function plucker(props, length) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = publish;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subject__ = __webpack_require__(36);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117);
/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
@@ -140591,7 +140719,7 @@ function publish(selector) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = publishBehavior;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BehaviorSubject__ = __webpack_require__(419);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117);
/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
@@ -140607,8 +140735,8 @@ function publishBehavior(value) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = publishLast;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncSubject__ = __webpack_require__(183);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncSubject__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117);
/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
@@ -140625,7 +140753,7 @@ function publishLast() {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = publishReplay;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(308);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117);
/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
@@ -140738,7 +140866,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = repeatWhen;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14);
@@ -140885,7 +141013,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = retryWhen;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14);
@@ -141090,7 +141218,7 @@ function dispatchNotification(state) {
/* unused harmony export SequenceEqualSubscriber */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */
@@ -141215,7 +141343,7 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = share;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multicast__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multicast__ = __webpack_require__(117);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__(316);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subject__ = __webpack_require__(36);
/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
@@ -141586,7 +141714,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49);
/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */
@@ -141659,7 +141787,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = switchAll;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(318);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119);
/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
@@ -141985,7 +142113,7 @@ var Timestamp = /*@__PURE__*/ (function () {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = toArray;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(187);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(188);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function toArrayReducer(arr, item, index) {
@@ -142179,7 +142307,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_async__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isNumeric__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isNumeric__ = __webpack_require__(191);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(49);
/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
@@ -142347,7 +142475,7 @@ function dispatchWindowClose(state) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__(25);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_subscribeToResult__ = __webpack_require__(14);
@@ -142491,7 +142619,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
/* harmony export (immutable) */ __webpack_exports__["a"] = windowWhen;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(36);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(56);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(48);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14);
@@ -143166,7 +143294,7 @@ var Immediate = {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isInteropObservable;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(118);
/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
function isInteropObservable(input) {
@@ -144881,7 +145009,7 @@ module.exports = Extract
/***/ (function(module, exports, __webpack_require__) {
var constants = __webpack_require__(651)
-var eos = __webpack_require__(173)
+var eos = __webpack_require__(174)
var util = __webpack_require__(3)
var alloc = __webpack_require__(380)
var toBuffer = __webpack_require__(462)
@@ -145431,7 +145559,7 @@ function through (write, end, opts) {
/*
* Module dependencies.
*/
-const fs = __webpack_require__(5);
+const fs = __webpack_require__(4);
const path = __webpack_require__(0);
const crypto = __webpack_require__(11);
const osTmpDir = __webpack_require__(772);
@@ -146043,7 +146171,7 @@ module.exports.setGracefulCleanup = setGracefulCleanup;
var net = __webpack_require__(164)
, tls = __webpack_require__(467)
, http = __webpack_require__(87)
- , https = __webpack_require__(195)
+ , https = __webpack_require__(196)
, events = __webpack_require__(77)
, assert = __webpack_require__(28)
, util = __webpack_require__(3)
@@ -146550,7 +146678,7 @@ var mod_assertplus = __webpack_require__(16);
var mod_util = __webpack_require__(3);
var mod_extsprintf = __webpack_require__(961);
-var mod_isError = __webpack_require__(113).isError;
+var mod_isError = __webpack_require__(114).isError;
var sprintf = mod_extsprintf.sprintf;
/*
diff --git a/.yarnrc b/.yarnrc
index 7fe6e33326b9..c8c3d9da3614 100644
--- a/.yarnrc
+++ b/.yarnrc
@@ -3,4 +3,4 @@
lastUpdateCheck 1581546341989
-yarn-path ".yarn/releases/yarn-1.22.10.cjs"
+yarn-path ".yarn/releases/yarn-1.22.17.cjs"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 861fb228477b..3b9ce15083bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,512 +1,592 @@
-
-
-# 12.2.9 (2021-10-06)
+
-### @angular-devkit/build-angular
-
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------- |
-| [9d45b7752](https://github.com/angular/angular-cli/commit/9d45b77522a9693c4876fdfd741e8869e89e0268) | fix | add web-streams-polyfill to downlevel exclusion list |
-| [ccedf53a8](https://github.com/angular/angular-cli/commit/ccedf53a820a748b56c84528294b36c7af30dbaf) | fix | update `esbuild` to `0.13.4` |
+# 13.1.0 (2021-12-09)
-## Special Thanks
+### @angular/cli
-Alan Agius and Charles Lyding
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------ |
+| [56f802b7d](https://github.com/angular/angular-cli/commit/56f802b7dd26bfc774b6b00982a1dbbe0bafddd0) | feat | ask to install angular-eslint when running ng lint in new projects |
+| [ecd9fb5c7](https://github.com/angular/angular-cli/commit/ecd9fb5c774b6301348c4514da04d58ae8903d06) | feat | provide more detailed error for not found builder |
+| [0b6071af3](https://github.com/angular/angular-cli/commit/0b6071af3a51e7d3f38a661bd4e0a3c3e81aff2f) | fix | `ng doc` does open browser on Windows |
-
+### @schematics/angular
-
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------------- |
+| [d5d9f042f](https://github.com/angular/angular-cli/commit/d5d9f042f2ea42573b7ff4fab90cab85d0c5ec0b) | feat | add VS Code configurations when generating a new workspace |
+| [f95cc8281](https://github.com/angular/angular-cli/commit/f95cc8281a64bd9ac19e0fa5d92cb0a6ee8c32ec) | feat | generate new projects using TypeScript 4.5 |
+| [21809e14c](https://github.com/angular/angular-cli/commit/21809e14cd5c666c82fdaebc9e601341dfb76d0a) | feat | loosen project name validation |
-# 13.0.0-next.8 (2021-10-05)
+### @angular-devkit/schematics-cli
-## Breaking Changes
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------ |
+| [339bab06c](https://github.com/angular/angular-cli/commit/339bab06cc25863571acb09cb3e877fed14ca2f9) | feat | generate new projects using TypeScript 4.5 |
### @angular-devkit/build-angular
-- With this change a number of deprecated dev-server builder options which proxied to the browser builder have been removed. These options should be configured in the browser builder instead.
-
-The removed options are:
-
-- `aot`
-- `sourceMap`
-- `deployUrl`
-- `baseHref`
-- `vendorChunk`
-- `commonChunk`
-- `optimization`
-- `progress`
-
-### @angular/cli
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------- |
+| [bc8563760](https://github.com/angular/angular-cli/commit/bc856376039287cf5fb6135ca5da65a9000f5664) | feat | add estimated transfer size to build output report |
+| [bc17cf0cd](https://github.com/angular/angular-cli/commit/bc17cf0cdd02bf50758e510756a26e6e6ca32d14) | feat | colorize file raw sizes based on failing budgets |
+| [3c681b68d](https://github.com/angular/angular-cli/commit/3c681b68d7a32f1cfaf3feee6b2e02cc6e0f0568) | feat | set `dir` attribute when using localization |
+| [6d0f99a2d](https://github.com/angular/angular-cli/commit/6d0f99a2deef957c15836c172b9f68f716f836a4) | feat | support JSON comments in dev-server proxy configuration file |
+| [9300545e6](https://github.com/angular/angular-cli/commit/9300545e6148b4548cc02bb6a311a2f0e2bb79c5) | feat | watch i18n translation files with dev server |
+| [9bacba342](https://github.com/angular/angular-cli/commit/9bacba3420cda7897091522415a8d55cf1b75106) | fix | differentiate components and global styles using file query instead of filename |
+| [7408511da](https://github.com/angular/angular-cli/commit/7408511da555f37560ca7e3b536e15dfc8f6a1e5) | fix | display cleaner errors |
+| [d55fc62ef](https://github.com/angular/angular-cli/commit/d55fc62ef2f8bc7a6f1190f56f8e8b64c9195263) | fix | fallback to use language ID to set the `dir` attribute |
+| [4c288b8bd](https://github.com/angular/angular-cli/commit/4c288b8bd28e7215887aa52025c4fa41fcf7bc01) | fix | lazy modules bundle budgets |
+| [562dc6a89](https://github.com/angular/angular-cli/commit/562dc6a8924826509d9012b2c0fe61c089077399) | fix | prefer ES2015 entrypoints when application targets ES2019 or lower |
+| [ac66e400c](https://github.com/angular/angular-cli/commit/ac66e400cddc81bde46949d1abe4560185dfbedb) | fix | Sass compilation in StackBlitz webcontainers |
+| [e1bac5bbb](https://github.com/angular/angular-cli/commit/e1bac5bbb36f391b89445ba61abe561c75746f30) | fix | update Angular peer dependencies to v13.1 prerelease |
+| [789ddfaeb](https://github.com/angular/angular-cli/commit/789ddfaeb0fcbc9aab1581384b88c3618e606c4b) | perf | disable webpack backwards compatible APIs |
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------- |
-| [e1b954d70](https://github.com/angular/angular-cli/commit/e1b954d707f90622d8a75fc45840cefeb224c286) | fix | keep relative migration paths during update analysis |
-
-### @angular-devkit/build-angular
+### @ngtools/webpack
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------- |
-| [22cd9edfa](https://github.com/angular/angular-cli/commit/22cd9edfafd357bb9d62a93dd56f033b3f34bbe8) | feat | favor es2020 main fields |
-| [000b0e51c](https://github.com/angular/angular-cli/commit/000b0e51c166ecd26b6f24d6a133ea5076df9849) | feat | remove deprecated dev-server options |
-| [4be6537dd](https://github.com/angular/angular-cli/commit/4be6537ddf4b32e8d204dbaa75f1a53712fe9d44) | fix | update TS/JS regexp checks to latest extensions |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
+| [5402f99f8](https://github.com/angular/angular-cli/commit/5402f99f8ad20e0a57456a416a992415fc6332bd) | fix | add `cjs` and `mjs` to passthrough files |
+| [10d4ede2d](https://github.com/angular/angular-cli/commit/10d4ede2de42dfc302dcb4c5790274290170568d) | fix | handle promise rejection during Angular program analyzes |
## Special Thanks
-Alan Agius, Charles Lyding and Doug Parker
+Alan Agius, Charles Lyding, Doug Parker, Ferdinand Malcher, Joey Perrott and Ruslan Lekhman
-
+
-# 12.2.8 (2021-10-01)
+# 12.2.14 (2021-12-07)
-### @angular-devkit/build-angular
+### @angular/cli
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------- |
-| [821a1b5a9](https://github.com/angular/angular-cli/commit/821a1b5a949d53f2e82f734062b711a166d42e24) | fix | babel adjust enum plugin incorrectly transforming loose enums |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------- |
+| [30295b33e](https://github.com/angular/angular-cli/commit/30295b33ed74667f31e9d3a4a0017910a85fd734) | fix | error when updating Angular packages across multi-major migrations |
+| [e07bd059e](https://github.com/angular/angular-cli/commit/e07bd059e3d6bc6b40191c036c467595ed119da7) | fix | logic which determines which temp version of the CLI is to be download during `ng update` |
+| [ce1ec0420](https://github.com/angular/angular-cli/commit/ce1ec0420770a8e28c1c1301df9e5eb4548d4c53) | fix | update `ng update` output for Angular packages |
+| [dd9f8df52](https://github.com/angular/angular-cli/commit/dd9f8df5204d639272f183795ebd48d7994df427) | fix | update `pacote` to `12.0.2` |
## Special Thanks
-Paul Gschwendtner
+Alan Agius and Doug Parker
-
+
-# 13.0.0-next.7 (2021-09-30)
+# 13.0.4 (2021-12-01)
-## Breaking Changes
-
-### @angular-devkit/build-angular
+### @angular/cli
-- TypeScript versions prior to 4.4 are no longer supported.
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------- |
+| [ded7b5c06](https://github.com/angular/angular-cli/commit/ded7b5c069a145d1b3e264538d7c4302919ad030) | fix | exit with a non-zero error code when migration fails during `ng update` |
+| [250a58b48](https://github.com/angular/angular-cli/commit/250a58b4820a738aba7609627fa7fce0a24f10db) | fix | logic which determines which temp version of the CLI is to be download during `ng update` |
### @schematics/angular
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------- |
-| [7bdcd7da1](https://github.com/angular/angular-cli/commit/7bdcd7da1ff3a31f4958d90d856beb297e99b187) | feat | create new projects with rxjs 7 |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------- |
+| [372e2e633](https://github.com/angular/angular-cli/commit/372e2e633f4bd9bf29c35d02890e1c6a70da3169) | fix | address eslint linting failures in `test.ts` |
-### @angular/cli
+### @angular-devkit/build-angular
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------- |
-| [c3acf3cc2](https://github.com/angular/angular-cli/commit/c3acf3cc26b9e37a3b8f4c369f42731f46b522ee) | fix | remove unused cli project options. |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------- |
+| [b835389c8](https://github.com/angular/angular-cli/commit/b835389c8a60749151039ed0baf0be025ce0932b) | fix | correctly extract messages when using cached build ([#22266](https://github.com/angular/angular-cli/pull/22266)) |
+| [647a5f0b1](https://github.com/angular/angular-cli/commit/647a5f0b18e49b2ece3f43c0a06bfb75d7caef49) | fix | don't watch nested `node_modules` when polling is enabled |
+| [4d01d4f72](https://github.com/angular/angular-cli/commit/4d01d4f72344c42f650f5495b21e6bd94069969a) | fix | transform remapped sourcemap into a plain object |
-### @angular-devkit/build-angular
+### @ngtools/webpack
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------------- |
-| [fb1ad7c5b](https://github.com/angular/angular-cli/commit/fb1ad7c5b3fa3df85f1d3dff3850e1ad0003ef9d) | feat | support ESM proxy configuration files for the dev server |
-| [505438cc4](https://github.com/angular/angular-cli/commit/505438cc4146b1950038531ce30e1f62f7c41d00) | feat | support TypeScript 4.4 |
-| [0e7277c63](https://github.com/angular/angular-cli/commit/0e7277c63a5fb76d9686289b779561c84c040ba0) | fix | babel adjust enum plugin incorrectly transforming loose enums |
-| [f383f3201](https://github.com/angular/angular-cli/commit/f383f3201b69d28f8755c0bd63134619f9da408d) | fix | ESM-interop loaded plugin creators of `@angular/localize/tools` not respected |
-| [884111ac0](https://github.com/angular/angular-cli/commit/884111ac0b8a73dca06d844b2ed795a3e3ed3289) | fix | update IE unsupported and deprecation messages |
-| [13cceab8e](https://github.com/angular/angular-cli/commit/13cceab8e737a12d0809f184f852ceb5620d81fb) | fix | use URLs for absolute import paths with ESM |
-| [4e0743c8a](https://github.com/angular/angular-cli/commit/4e0743c8ad5879f212f2ea232ac9492848a8df2c) | perf | change webpack hashing function to `xxhash64` |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------- |
+| [4d918ef99](https://github.com/angular/angular-cli/commit/4d918ef9912d53a09d73fb19fa41b121dceed37c) | fix | JIT mode CommonJS accessing inexistent `default` property |
## Special Thanks
-Alan Agius, Charles Lyding, Doug Parker and Paul Gschwendtner
+Alan Agius, Billy Lando, David-Emmanuel DIVERNOIS and Derek Cormier
-
+
-# 13.0.0-next.6 (2021-09-22)
+# 13.0.3 (2021-11-17)
-## Breaking Changes
+## Special Thanks
-### @ngtools/webpack
+Alan Agius, Joey Perrott and Krzysztof Platis
-- Applications directly using the `webpack-cli` and not the Angular CLI to build must set the environment variable `DISABLE_V8_COMPILE_CACHE=1`. The `@ngtools/webpack` package now uses dynamic imports to provide support for the ESM `@angular/compiler-cli` package. The `v8-compile-cache` package used by the `webpack-cli` does not currently support dynamic import expressions and will cause builds to fail if the environment variable is not specified. Applications using the Angular CLI are not affected by this limitation.
+
-### @angular-devkit/build-angular
+
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------- |
-| [0d76bf04b](https://github.com/angular/angular-cli/commit/0d76bf04bca6e083865972b5398a32bbe9396e14) | fix | support WASM-based esbuild optimizer fallback |
+# 13.0.2 (2021-11-10)
-### @angular-devkit/build-webpack
+### @angular/cli
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------ |
-| [9efcb32e3](https://github.com/angular/angular-cli/commit/9efcb32e378442714eae4caec43281123c5e30f6) | fix | better handle concurrent dev-servers |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------ |
+| [34047b1ad](https://github.com/angular/angular-cli/commit/34047b1adccd7eb852c1900c872e9ca71c8d4cd9) | fix | avoid redirecting @angular/core in Angular migrations |
+| [ff4538e98](https://github.com/angular/angular-cli/commit/ff4538e981cfff49b6e8433ffcb5ac2d2ea5d07e) | fix | favor ng-update `packageGroupName` in ng update output |
-### @ngtools/webpack
+### @schematics/angular
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------- |
-| [7d98ab3df](https://github.com/angular/angular-cli/commit/7d98ab3df9f7c15612c69cedca5a01a535301508) | refactor | support an ESM-only `@angular/compiler-cli` package |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
+| [1bc00b6fe](https://github.com/angular/angular-cli/commit/1bc00b6feb9033fd611dec965c82f03e4135a9f4) | fix | migrate ng-packagr configurations in package.json |
+| [9ea74a13d](https://github.com/angular/angular-cli/commit/9ea74a13d07208373490c7cdb3ff7c452c698322) | fix | show warning when migrating ng-packagr JS configurations |
+
+### @angular-devkit/build-angular
+
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------------- |
+| [35164bf92](https://github.com/angular/angular-cli/commit/35164bf92b986a67215580622aaddc4148a7c822) | fix | don't restore `input` of type `file` during HMR |
+| [facb5d8ff](https://github.com/angular/angular-cli/commit/facb5d8ffd4f6a81d3132515b8bae64278cf8316) | fix | don't show `[NG HMR] Unknown input type` when restoring file type input |
+| [ef8815d04](https://github.com/angular/angular-cli/commit/ef8815d0434836f2d8119e91a7bc09742ff77d37) | fix | improve sourcemap fidelity during code-coverage |
+| [966a1334a](https://github.com/angular/angular-cli/commit/966a1334a6502f5d4a18710ae22e739e62770101) | fix | suppress "@charset" must be the first rule in the file warning |
+| [1cdc24da0](https://github.com/angular/angular-cli/commit/1cdc24da0105fad75221e3c145de12dafc601059) | fix | update Angular peer dependencies to 13.0 stable |
## Special Thanks
-Alan Agius and Charles Lyding
+Alan Agius, Charles Lyding, Joey Perrott and Paul Gschwendtner
-
+
-# 12.2.7 (2021-09-22)
+
-### @angular-devkit/build-angular
+# 13.0.1 (2021-11-03)
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------- |
-| [d856b4d23](https://github.com/angular/angular-cli/commit/d856b4d2369bea76ce65fc5f6d1585145ad41618) | fix | support WASM-based esbuild optimizer fallback |
+### @schematics/angular
+
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------- |
+| [40f599241](https://github.com/angular/angular-cli/commit/40f599241e278478c694580c9dec4f5cc34db011) | fix | updated Angular new project version to v13.0.0 |
## Special Thanks
-Alan Agius and Charles Lyding
+Charles Lyding and Joey Perrott
-
-
-# 13.0.0-next.5 (2021-09-15)
+
-### @angular/cli
-
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
-| [d3fa202e9](https://github.com/angular/angular-cli/commit/d3fa202e9a26926f0660b1e1f156012ea41b1711) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
+# 12.2.13 (2021-11-03)
### @angular-devkit/build-angular
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
-| [590c15664](https://github.com/angular/angular-cli/commit/590c15664282e6d80bb655191272ab2be1f2e399) | fix | add web-streams-polyfill to downlevel exclusion list |
-| [df8f909d8](https://github.com/angular/angular-cli/commit/df8f909d80ca787e24cb040f9ee2517bf050c20b) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------- |
+| [a2bd940e4](https://github.com/angular/angular-cli/commit/a2bd940e4ab44db57b0fc69d5346d2862a19c879) | fix | add verbose logging for differential loading and i18n |
## Special Thanks
-Alan Agius, Charles Lyding and Joey Perrott
+Charles Lyding and Doug Parker
-
+
-# 12.2.6 (2021-09-15)
+
-### @angular/cli
+# 13.0.0 (2021-11-03)
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
-| [8b21effad](https://github.com/angular/angular-cli/commit/8b21effad673877cf1a82ef7d0601393a65517fb) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
+## Breaking Changes
-### @angular-devkit/build-angular
+### @angular/cli
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
-| [ea60f0f52](https://github.com/angular/angular-cli/commit/ea60f0f527f2ab8fc5acc967138c4ae993946923) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
+- We drop support for Node.js versions prior to `12.20`.
-## Special Thanks
+### @schematics/angular
-Alan Agius
+- `classlist.js` and `web-animations-js` are removed from application polyfills and uninstalled from the package. These were only needed for compatibility with Internet Explorer, which is no longer needed now that Angular only supports evergreen browsers. See: https://angular.io/guide/browser-support.
-
+Add the following to the polyfills file for an app to re-add these packages:
-# 13.0.0-next.4 (2021-09-08)
+```typescript
+import 'classlist.js';
+import 'web-animations-js';
+```
-### @angular-devkit/build-angular
+And then run:
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
-| [decb1d14b](https://github.com/angular/angular-cli/commit/decb1d14b038c142213ded334a79570a09e9b31f) | fix | improve Safari browserslist to esbuild target conversion |
+```sh
+npm install classlist.js web-animations-js --save
+```
-## Special Thanks
+- We removed several deprecated `@schematics/angular` deprecated options.
+- `lintFix` have been removed from all schematics. `ng lint --fix` should be used instead.
+- `legacyBrowsers` have been removed from the `application` schematics since IE 11 is no longer supported.
+- `configuration` has been removed from the `web-worker` as it was unused.
+- `target` has been removed from the `service-worker` as it was unused.
-Alan Agius, Charles Lyding and Doug Parker
+### @angular-devkit/build-angular
-
+- Support for `karma-coverage-instanbul-reporter` has been dropped in favor of the official karma coverage plugin `karma-coverage`.
+
+- Support for `node-sass` has been removed. `sass` will be used by default to compile SASS and SCSS files.
+
+- `NG_PERSISTENT_BUILD_CACHE` environment variable option no longer have effect. Configure `cli.cache` in the workspace configuration instead.
+
+```json
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "cli": {
+ "cache": {
+ "enabled": true,
+ "path": ".custom-cache-path",
+ "environment": "all"
+ }
+ }
+ ...
+}
+```
-# 12.2.5 (2021-09-08)
+- Calling `BuilderContext.scheduleBuilder()` with a builder from `@angular-devkit/build-angular` now requires passing the `target` property in the 3rd argument, like in the following example:
-### @angular-devkit/build-angular
+ ```typescript
+ context.scheduleBuilder('@angular-devkit/build-angular:ng-packagr', options, {
+ target: context.target,
+ });
+ ```
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
-| [0498768c5](https://github.com/angular/angular-cli/commit/0498768c54de225a40c28fdf27bb1fc43959ba20) | fix | disable dev-server response compression |
-| [367fce2e9](https://github.com/angular/angular-cli/commit/367fce2e9f9389c41f2ed5361ef6749198c49785) | fix | improve Safari browserslist to esbuild target conversion |
+- The automatic inclusion of Angular-required ES2015 polyfills to support ES5 browsers has been removed. Previously when targetting ES5 within the application's TypeScript configuration or listing an ES5 requiring browser in the browserslist file, Angular-required polyfills were included in the built application. However, with Angular no longer supporting IE11, there are now no browsers officially supported by Angular that would require these polyfills. As a result, the automatic inclusion of these ES2015 polyfills has been removed. Any polyfills manually added to an application's code are not affected by this change.
-## Special Thanks:
+- With this change a number of deprecated dev-server builder options which proxied to the browser builder have been removed. These options should be configured in the browser builder instead.
-Alan Agius and Charles Lyding
+The removed options are:
+
+- `aot`
+- `sourceMap`
+- `deployUrl`
+- `baseHref`
+- `vendorChunk`
+- `commonChunk`
+- `optimization`
+- `progress`
-
+- With this change we removed several deprecated builder options
+- `extractCss` has been removed from the browser builder. CSS is now always extracted.
+- `servePathDefaultWarning` and `hmrWarning` have been removed from the dev-server builder. These options had no effect.
-# 13.0.0-next.3 (2021-09-01)
+- Deprecated `@angular-devkit/build-angular:tslint` builder has been removed. Use https://github.com/angular-eslint/angular-eslint instead.
-## Breaking Changes
+- Differential loading support has been removed. With Angular no longer supporting IE11, there are now no browsers officially supported by Angular that require ES5 code. As a result, differential loading's functionality for creating and conditionally loading ES5 and ES2015+ variants of an application is no longer required.
-### @angular-devkit/build-angular
+- TypeScript versions prior to 4.4 are no longer supported.
- The dev-server now uses WebSockets to communicate changes to the browser during HMR and live-reloaded. If during your development you are using a proxy you will need to enable proxying of WebSockets.
+- We remove inlining of Google fonts in WOFF format since IE 11 is no longer supported. Other supported browsers use WOFF2.
+
### @angular-devkit/build-webpack
- Support for `webpack-dev-server` version 3 has been removed. For more information about the migration please see: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
Note: this change only affects users depending on `@angular-devkit/build-webpack` directly.
-### @ngtools/webpack
+### @angular-devkit/core
-- Deprecated `inlineStyleMimeType` option has been removed from `AngularWebpackPluginOptions`. Use `inlineStyleFileExtension` instead.
+- With this change we drop support for the deprecated behaviour to transform `id` in schemas. Use `$id` instead.
-### @schematics/angular
+Note: this only effects schematics and builders authors.
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------- |
-| [732ef7985](https://github.com/angular/angular-cli/commit/732ef798523f74994ed3d482a65b191058674d19) | fix | add browserslist configuration in library projects |
+- The deprecated JSON parser has been removed from public API. [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) should be used instead.
-### @angular-devkit/build-angular
+### @angular-devkit/schematics
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------- |
-| [32dbf659a](https://github.com/angular/angular-cli/commit/32dbf659acb632fac1d76d99d8191ea9c5e6350b) | feat | update `webpack-dev-server` to version 4 |
-| [76d6d8826](https://github.com/angular/angular-cli/commit/76d6d8826f9968f84edf219f67b84673d70bbe95) | fix | set browserslist defaults |
+- `isAction` has been removed without replacement as it was unused.
-### @angular-devkit/build-webpack
+- With this change we remove the following deprecated APIs
+- `TslintFixTask`
+- `TslintFixTaskOptions`
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------- |
-| [a0b5897d5](https://github.com/angular/angular-cli/commit/a0b5897d50a00ee4668029c2cbc47cacd2ab925f) | feat | update `webpack-dev-server` to version 4 |
+**Note:** this only effects schematics developers.
### @ngtools/webpack
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------- |
-| [8ce8e4edc](https://github.com/angular/angular-cli/commit/8ce8e4edc5ca2984d6a36fe4c7d308fa7f089102) | refactor | remove deprecated `inlineStyleMimeType` option |
-
-## Special Thanks
+- Deprecated `inlineStyleMimeType` option has been removed from `AngularWebpackPluginOptions`. Use `inlineStyleFileExtension` instead.
-Alan Agius and Joey Perrott
+- Applications directly using the `webpack-cli` and not the Angular CLI to build must set the environment variable `DISABLE_V8_COMPILE_CACHE=1`. The `@ngtools/webpack` package now uses dynamic imports to provide support for the ESM `@angular/compiler-cli` package. The `v8-compile-cache` package used by the `webpack-cli` does not currently support dynamic import expressions and will cause builds to fail if the environment variable is not specified. Applications using the Angular CLI are not affected by this limitation.
-
+## Deprecations
-# 12.2.4 (2021-09-01)
+###
-### @angular-devkit/build-angular
+- `@angular-devkit/build-optimizer`
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------- |
-| [aaadef026](https://github.com/angular/angular-cli/commit/aaadef02698ba729ca04ccd4159bda5b6582babb) | fix | update `esbuild` to `0.12.24` |
-| [f8a9f4a01](https://github.com/angular/angular-cli/commit/f8a9f4a0100286b7cf656ffbe486c3424cad5172) | fix | update `mini-css-extract-plugin` to `2.2.1` |
+It's functionality has been included in `@angular-devkit/build-angular` so this package is no longer needed by the CLI and we will stop publishing the package soon. It has been an experimental (never hit `1.0.0`) and internal (only used by Angular itself) package and should be not be used directly by others.
-## Special Thanks
+### @angular-devkit/build-angular
-Alan Agius
+- `NG_BUILD_CACHE` environment variable option will be removed in the next major version. Configure `cli.cache` in the workspace configuration instead.
-
+### @angular/cli
-# 13.0.0-next.2 (2021-08-26)
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------- |
+| [9fe55752d](https://github.com/angular/angular-cli/commit/9fe55752db8bb50cad5a1ddfe670dce06528e23e) | feat | officially support Node.js v16 |
+| [5ad145722](https://github.com/angular/angular-cli/commit/5ad145722f66af526a36983b259c6d625c93f307) | fix | error when updating Angular packages across multi-major migrations |
+| [e4bc35e33](https://github.com/angular/angular-cli/commit/e4bc35e332e378f8d238f4069dc56f422fe205d6) | fix | exclude packages from ng add that contain invalid peer dependencies |
+| [e1b954d70](https://github.com/angular/angular-cli/commit/e1b954d707f90622d8a75fc45840cefeb224c286) | fix | keep relative migration paths during update analysis |
+| [c3acf3cc2](https://github.com/angular/angular-cli/commit/c3acf3cc26b9e37a3b8f4c369f42731f46b522ee) | fix | remove unused cli project options. |
+| [77fe6c4e6](https://github.com/angular/angular-cli/commit/77fe6c4e67147ff42fa6350edaf4ef7dc184a3a6) | fix | update `engines` to require `node` `12.20.0` |
+| [8795536a3](https://github.com/angular/angular-cli/commit/8795536a31efbed6373787188cb21c5d1e0accbd) | fix | update `ng update` output for Angular packages |
+| [d8c9f6eaf](https://github.com/angular/angular-cli/commit/d8c9f6eaf4513639741d20c6af97a751b33b968e) | fix | update the update command to fully support Node.js v16 |
### @schematics/angular
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
-| [4f91816b2](https://github.com/angular/angular-cli/commit/4f91816b2951c0e2b0109ad1938eb0ae632c0c76) | feat(@schematics/angular): migrate libraries to be published from ViewEngine to Ivy Partial compilation |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------- |
+| [7ff8c5350](https://github.com/angular/angular-cli/commit/7ff8c5350ea2e49574dd659adae02215957d2685) | feat | add `/.angular/cache` to `.gitignore` |
+| [3ba13f467](https://github.com/angular/angular-cli/commit/3ba13f467c12f4ad0c314cc92a2d94fb63f640ec) | feat | add `noImplicitOverride` and `noPropertyAccessFromIndexSignature` to workspace tsconfig |
+| [268a03b63](https://github.com/angular/angular-cli/commit/268a03b63094d9c680401bc0977edafb22826ce3) | feat | add migration to update the workspace config |
+| [7bdcd7da1](https://github.com/angular/angular-cli/commit/7bdcd7da1ff3a31f4958d90d856beb297e99b187) | feat | create new projects with rxjs 7 |
+| [eac18aed7](https://github.com/angular/angular-cli/commit/eac18aed78da55efb840a3ef6f5e90718946504c) | feat | drop polyfills required only for Internet Explorer now that support has been dropped for it |
+| [4f91816b2](https://github.com/angular/angular-cli/commit/4f91816b2951c0e2b0109ad1938eb0ae632c0c76) | feat | migrate libraries to be published from ViewEngine to Ivy Partial compilation |
+| [5986befcd](https://github.com/angular/angular-cli/commit/5986befcdc953c0e8c90c756ac1c89b8c4b66614) | feat | remove deprecated options |
+| [9fbd16655](https://github.com/angular/angular-cli/commit/9fbd16655e86ec6fc598a47436e3e80a48beb649) | feat | remove IE 11 specific polyfills |
+| [a7b2e6f51](https://github.com/angular/angular-cli/commit/a7b2e6f512d2a1124f0d2c68caacfe6552a10cd5) | feat | update ngsw-config resources extensions |
+| [732ef7985](https://github.com/angular/angular-cli/commit/732ef798523f74994ed3d482a65b191058674d19) | fix | add browserslist configuration in library projects |
+| [585adacd0](https://github.com/angular/angular-cli/commit/585adacd0624ddf32c5c69a755d8e542f3463861) | fix | don't add `destroyAfterEach` in newly generated spec files |
+| [e58226ee9](https://github.com/angular/angular-cli/commit/e58226ee948ea88f27a81d50d71945b5c9c39ee3) | fix | don't export `renderModuleFactory` from server file |
+| [0ec0ad8a4](https://github.com/angular/angular-cli/commit/0ec0ad8a4dba4a778b368c5cd76ef13fb370b310) | fix | remove `target` and `lib` options for library tsconfig |
+| [f227e145d](https://github.com/angular/angular-cli/commit/f227e145dfbec2954cb96c92ab3c4cb97cbe0f32) | fix | updated Angular new project version to v13.0 prerelease |
+
+###
+
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------- |
+| [5e435ff37](https://github.com/angular/angular-cli/commit/5e435ff37703f9ffea7fa92fbd5cd42d9a3db07e) | docs | mark `@angular-devkit/build-optimizer` as deprecated. |
+
+### @angular-devkit/architect
+
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------ |
+| [09e039500](https://github.com/angular/angular-cli/commit/09e039500f34b0d6a16e62128409ac5821e8b9c2) | feat | include workspace extensions in project metadata |
-### @angular-devkit/schematics
+### @angular-devkit/build-angular
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| [0565ed62e](https://github.com/angular/angular-cli/commit/0565ed62eb08c1e82cffb2533e6afde216c37eb7) | feat(@angular-devkit/schematics): add UpdateBuffer2 based on magic-string |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------- |
+| [f53bf9dc2](https://github.com/angular/angular-cli/commit/f53bf9dc21ee9aa8a682b8a82ee8a9870fa859e1) | feat | add `type=module` to all scripts tags |
+| [e95ecb8ab](https://github.com/angular/angular-cli/commit/e95ecb8ab0382eb803741619c446d6cc7b215ba0) | feat | deprecate deployUrl |
+| [7dcfffaff](https://github.com/angular/angular-cli/commit/7dcfffafff6f3d29bbe679a90cdf77b1292fec0b) | feat | drop support for `karma-coverage-instanbul-reporter` |
+| [ac3fc2752](https://github.com/angular/angular-cli/commit/ac3fc2752f28761e1cd42157b59dcf2364ae5567) | feat | drop support for `node-sass` |
+| [5904afd1d](https://github.com/angular/angular-cli/commit/5904afd1de3ffa0bb6cd1757795ba9abfce9e523) | feat | enable disk cache by default and provide configurable options |
+| [22cd9edfa](https://github.com/angular/angular-cli/commit/22cd9edfafd357bb9d62a93dd56f033b3f34bbe8) | feat | favor es2020 main fields |
+| [7576136b2](https://github.com/angular/angular-cli/commit/7576136b2fc8a9173b0a92e2ab14c9bc2559081e) | feat | remove automatic inclusion of ES5 browser polyfills |
+| [000b0e51c](https://github.com/angular/angular-cli/commit/000b0e51c166ecd26b6f24d6a133ea5076df9849) | feat | remove deprecated dev-server options |
+| [20e48a33c](https://github.com/angular/angular-cli/commit/20e48a33c14a1b0b959ba0a45018df53a3e129c8) | feat | remove deprecated options |
+| [e78f6ab5d](https://github.com/angular/angular-cli/commit/e78f6ab5d8f00338d826c8407ce5c8fca40cf097) | feat | remove deprecated tslint builder |
+| [701214d17](https://github.com/angular/angular-cli/commit/701214d174586fe7373b6155024c9b6e97b26377) | feat | remove differential loading support |
+| [fb1ad7c5b](https://github.com/angular/angular-cli/commit/fb1ad7c5b3fa3df85f1d3dff3850e1ad0003ef9d) | feat | support ESM proxy configuration files for the dev server |
+| [505438cc4](https://github.com/angular/angular-cli/commit/505438cc4146b1950038531ce30e1f62f7c41d00) | feat | support TypeScript 4.4 |
+| [32dbf659a](https://github.com/angular/angular-cli/commit/32dbf659acb632fac1d76d99d8191ea9c5e6350b) | feat | update `webpack-dev-server` to version 4 |
+| [c1efaa17f](https://github.com/angular/angular-cli/commit/c1efaa17feb1d2911dcdea12688d75086d410bf1) | fix | calculate valid Angular versions from peerDependencies |
+| [d7af4a7b5](https://github.com/angular/angular-cli/commit/d7af4a7b536a7c43704f808ea208bc9f230d2403) | fix | enable custom `es2020` and `es2015` conditional exports |
+| [f383f3201](https://github.com/angular/angular-cli/commit/f383f3201b69d28f8755c0bd63134619f9da408d) | fix | ESM-interop loaded plugin creators of `@angular/localize/tools` not respected |
+| [7934becb5](https://github.com/angular/angular-cli/commit/7934becb581d07c8e1f74898ddd4c20f050be659) | fix | generate unique webpack runtimes |
+| [b14e0a547](https://github.com/angular/angular-cli/commit/b14e0a54727352a6939c7a0ff13dffe2deaa67d2) | fix | improve sourcemaps fidelity when code coverage is enabled |
+| [e19287453](https://github.com/angular/angular-cli/commit/e19287453c10740ea21b31a6c8a3cd5f3714955d) | fix | move `@angular/localize` detection prior to webpack initialization |
+| [76d6d8826](https://github.com/angular/angular-cli/commit/76d6d8826f9968f84edf219f67b84673d70bbe95) | fix | set browserslist defaults |
+| [167eed465](https://github.com/angular/angular-cli/commit/167eed4654be4480c45d7fdfe7a0b9f160170289) | fix | update Angular peer dependencies to v13.0 prerelease |
+| [1d8cdf853](https://github.com/angular/angular-cli/commit/1d8cdf853dc8fdea78b067a715b3342ed9427caa) | fix | update esbuild to 0.13.12 |
+| [884111ac0](https://github.com/angular/angular-cli/commit/884111ac0b8a73dca06d844b2ed795a3e3ed3289) | fix | update IE unsupported and deprecation messages |
+| [4be6537dd](https://github.com/angular/angular-cli/commit/4be6537ddf4b32e8d204dbaa75f1a53712fe9d44) | fix | update TS/JS regexp checks to latest extensions |
+| [427a9ee97](https://github.com/angular/angular-cli/commit/427a9ee9738c0911caeaba5fb4b59d183ffe6244) | fix | update workspace tsconfig lib es2020 |
+| [ea926db25](https://github.com/angular/angular-cli/commit/ea926db257ad3b042af86178e472b5763a695146) | fix | use es2015 when generating server bundles |
+| [13cceab8e](https://github.com/angular/angular-cli/commit/13cceab8e737a12d0809f184f852ceb5620d81fb) | fix | use URLs for absolute import paths with ESM |
+| [4e0743c8a](https://github.com/angular/angular-cli/commit/4e0743c8ad5879f212f2ea232ac9492848a8df2c) | perf | change webpack hashing function to `xxhash64` |
+| [cb7d156c2](https://github.com/angular/angular-cli/commit/cb7d156c23a7ef2f1c2f338db1487b85f8b98690) | perf | use esbuild as a CSS optimizer for global styles |
+| [8e82263c5](https://github.com/angular/angular-cli/commit/8e82263c5e7da6ca25bdd4e2ce9ad2c775d623b7) | perf | use esbuild/terser combination to optimize global scripts |
+| [e82eef924](https://github.com/angular/angular-cli/commit/e82eef924eb172a98fa157a958bde2cfcaa52ce6) | refactor | remove WOFF handling from inline-fonts processor |
-### @ngtools/webpack
+### @angular-devkit/build-webpack
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
-| [7928b18ed](https://github.com/angular/angular-cli/commit/7928b18edf34243a404b5a4f40a5d6e40247d797) | perf(@ngtools/webpack): reduce repeat path mapping analysis during resolution |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------- |
+| [a0b5897d5](https://github.com/angular/angular-cli/commit/a0b5897d50a00ee4668029c2cbc47cacd2ab925f) | feat | update `webpack-dev-server` to version 4 |
+| [9efcb32e3](https://github.com/angular/angular-cli/commit/9efcb32e378442714eae4caec43281123c5e30f6) | fix | better handle concurrent dev-servers |
-## Special Thanks:
+### @angular-devkit/core
-Alan Agius, Charles Lyding, Doug Parker, Lukas Spirig and Trevor Karjanis
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------- |
+| [0c92ea5ca](https://github.com/angular/angular-cli/commit/0c92ea5ca34d82849862d55c4210cf62c819d514) | feat | remove deprecated schema id handling |
+| [9874aff71](https://github.com/angular/angular-cli/commit/9874aff71ecb5f3baf6c1dcc489581d1dcb58491) | fix | add missing option peer dependency on `chokidar` |
+| [a54e5e065](https://github.com/angular/angular-cli/commit/a54e5e06551c828eb5cf08695674e04fd8a78bf3) | fix | support Node.js v16 with `NodeJsSyncHost`/`NodeJsAsyncHost` delete operation |
+| [d722fdf1f](https://github.com/angular/angular-cli/commit/d722fdf1f67c394762906794605bc1ad657670d1) | refactor | remove deprecated JSON parser |
-
+### @angular-devkit/schematics
-# 12.2.3 (2021-08-26)
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
+| [0565ed62e](https://github.com/angular/angular-cli/commit/0565ed62eb08c1e82cffb2533e6afde216c37eb7) | feat | add UpdateBuffer2 based on magic-string |
+| [8954d1152](https://github.com/angular/angular-cli/commit/8954d1152b6c1a33dd7d4b63d2fa430d91e7b370) | feat | remove deprecated `isAction` |
+| [053b7d66c](https://github.com/angular/angular-cli/commit/053b7d66c269423804891e4d43d61f8605838e24) | feat | remove deprecated tslint APIs |
+| [bdd89ae84](https://github.com/angular/angular-cli/commit/bdd89ae84ad6919b670dde862de72f562c86d0c5) | fix | handle zero or negative length removals in update buffer |
-### @angular-devkit/build-angular
+### @ngtools/webpack
-| Commit | Type | Description |
-| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------- |
-| [3e3321857](https://github.com/angular/angular-cli/commit/3e33218578007f93a131dc8be569e9985179098f) | fix | RGBA converted to hex notation in component styles breaks IE11 |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------- |
+| [d2a97f919](https://github.com/angular/angular-cli/commit/d2a97f9193fcf7e454fe8eb48c0ed732d3b2f24f) | fix | update Angular peer dependencies to v13.0 prerelease |
+| [7928b18ed](https://github.com/angular/angular-cli/commit/7928b18edf34243a404b5a4f40a5d6e40247d797) | perf | reduce repeat path mapping analysis during resolution |
+| [8ce8e4edc](https://github.com/angular/angular-cli/commit/8ce8e4edc5ca2984d6a36fe4c7d308fa7f089102) | refactor | remove deprecated `inlineStyleMimeType` option |
+| [7d98ab3df](https://github.com/angular/angular-cli/commit/7d98ab3df9f7c15612c69cedca5a01a535301508) | refactor | support an ESM-only `@angular/compiler-cli` package |
-## Special Thanks:
+## Special Thanks
-Alan Agius and Trevor Karjanis
+Alan Agius, Charles Lyding, Doug Parker, Douglas Parker, Joey Perrott, Kristiyan Kostadinov, Lukas Spirig and Paul Gschwendtner
-
+
-# 13.0.0-next.1 (2021-08-18)
+
+
+# 12.2.9 (2021-10-06)
### @angular-devkit/build-angular
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
-| [aba54ae78](https://github.com/angular/angular-cli/commit/aba54ae783816502122ec63530a7274229c31762) | fix(@angular-devkit/build-angular): provide supported browsers to esbuild |
-| [9eb599da2](https://github.com/angular/angular-cli/commit/9eb599da2b71f067e607f86266cecdb008b6a867) | fix(@angular-devkit/build-angular): handle undefined entrypoints when marking async chunks |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ---------------------------------------------------- |
+| [9d45b7752](https://github.com/angular/angular-cli/commit/9d45b77522a9693c4876fdfd741e8869e89e0268) | fix | add web-streams-polyfill to downlevel exclusion list |
+| [ccedf53a8](https://github.com/angular/angular-cli/commit/ccedf53a820a748b56c84528294b36c7af30dbaf) | fix | update `esbuild` to `0.13.4` |
-## Breaking Changes
+## Special Thanks
-### @angular-devkit/core
+Alan Agius and Charles Lyding
-The deprecated JSON parser has been removed from public API. [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) should be used instead.
+
-## Special Thanks:
+
-Alan Agius, Charles Lyding, Douglas Parker, Joey Perrott and Simon Primetzhofer
+# 12.2.8 (2021-10-01)
-
+### @angular-devkit/build-angular
-# 12.2.2 (2021-08-18)
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------------------------- |
+| [821a1b5a9](https://github.com/angular/angular-cli/commit/821a1b5a949d53f2e82f734062b711a166d42e24) | fix | babel adjust enum plugin incorrectly transforming loose enums |
-### @angular-devkit/build-angular
+## Special Thanks
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
-| [a55118a75](https://github.com/angular/angular-cli/commit/a55118a753555c0082cfd434379559df7e3eb7f9) | fix: provide supported browsers to esbuild |
-| [81baa4f95](https://github.com/angular/angular-cli/commit/81baa4f956443fcc718f9021fd23ab7064d04607) | fix: update Angular peer dependencies to 12.2 stable |
-| [297410ae8](https://github.com/angular/angular-cli/commit/297410ae860860d71905639cf38b49ff05813845) | fix: handle undefined entrypoints when marking async chunks |
+Paul Gschwendtner
-### @ngtools/webpack
+
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
-| [b7199f366](https://github.com/angular/angular-cli/commit/b7199f366841d976b502ad5f1923e24ea2f6b302) | fix: update Angular peer dependencies to 12.2 stable |
+
-## Special Thanks:
+# 12.2.7 (2021-09-22)
-Alan Agius, Charles Lyding, Joey Perrott and Simon Primetzhofer
+### @angular-devkit/build-angular
-
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------- |
+| [d856b4d23](https://github.com/angular/angular-cli/commit/d856b4d2369bea76ce65fc5f6d1585145ad41618) | fix | support WASM-based esbuild optimizer fallback |
-# 13.0.0-next.0 (2021-08-11)
+## Special Thanks
-### @angular/cli
+Alan Agius and Charles Lyding
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
-| [77fe6c4e6](https://github.com/angular/angular-cli/commit/77fe6c4e67147ff42fa6350edaf4ef7dc184a3a6) | fix(@angular/cli): update `engines` to require `node` `12.20.0` |
-| [c0f1b5ea5](https://github.com/angular/angular-cli/commit/c0f1b5ea5200e6ecc05fb40f875fd7ba45803809) | fix(@angular/cli): show error when using non-TTY terminal without passing `--skip-confirmation` during `ng add` |
-| [259e26979](https://github.com/angular/angular-cli/commit/259e26979ebc712ee08fd36fb68a9576c1e02447) | fix(@angular/cli): merge npmrc files values |
+
-### @schematics/angular
+
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
-| [3ba13f467](https://github.com/angular/angular-cli/commit/3ba13f467c12f4ad0c314cc92a2d94fb63f640ec) | feat(@schematics/angular): add `noImplicitOverride` and `noPropertyAccessFromIndexSignature` to workspace tsconfig |
-| [a7b2e6f51](https://github.com/angular/angular-cli/commit/a7b2e6f512d2a1124f0d2c68caacfe6552a10cd5) | feat(@schematics/angular): update ngsw-config resources extensions |
-| [f227e145d](https://github.com/angular/angular-cli/commit/f227e145dfbec2954cb96c92ab3c4cb97cbe0f32) | fix(@schematics/angular): updated Angular new project version to v13.0 prerelease |
-| [268a03b63](https://github.com/angular/angular-cli/commit/268a03b63094d9c680401bc0977edafb22826ce3) | feat(@schematics/angular): add migration to update the workspace config |
-| [5986befcd](https://github.com/angular/angular-cli/commit/5986befcdc953c0e8c90c756ac1c89b8c4b66614) | feat(@schematics/angular): remove deprecated options |
-| [9fbd16655](https://github.com/angular/angular-cli/commit/9fbd16655e86ec6fc598a47436e3e80a48beb649) | feat(@schematics/angular): remove IE 11 specific polyfills |
+# 12.2.6 (2021-09-15)
-### @angular-devkit/schematics-cli
+### @angular/cli
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| [b9e7f8958](https://github.com/angular/angular-cli/commit/b9e7f89589626f1443216a584c539491cec19a4d) | fix(@angular-devkit/schematics-cli): log when in debug and/or dry run modes |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
+| [8b21effad](https://github.com/angular/angular-cli/commit/8b21effad673877cf1a82ef7d0601393a65517fb) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
### @angular-devkit/build-angular
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
-| [d67e7ad2f](https://github.com/angular/angular-cli/commit/d67e7ad2fc335a7e8476c6049c2d372a0ed45c0c) | fix(@angular-devkit/build-angular): ensure native async is downlevelled in third-party libraries |
-| [8e82263c5](https://github.com/angular/angular-cli/commit/8e82263c5e7da6ca25bdd4e2ce9ad2c775d623b7) | perf(@angular-devkit/build-angular): use esbuild/terser combination to optimize global scripts |
-| [e95ecb8ab](https://github.com/angular/angular-cli/commit/e95ecb8ab0382eb803741619c446d6cc7b215ba0) | feat(@angular-devkit/build-angular): deprecate deployUrl |
-| [cb7d156c2](https://github.com/angular/angular-cli/commit/cb7d156c23a7ef2f1c2f338db1487b85f8b98690) | perf(@angular-devkit/build-angular): use esbuild as a CSS optimizer for global styles |
-| [cdfaeee08](https://github.com/angular/angular-cli/commit/cdfaeee089f3458b1924eb516a2b4275e662b079) | fix(@angular-devkit/build-angular): support both pure annotation forms for static properties |
-| [2aa6f579d](https://github.com/angular/angular-cli/commit/2aa6f579d7b5af13eeb5bbf35f78d5411738b98a) | fix(@angular-devkit/build-angular): do not consume inline sourcemaps when vendor sourcemaps is disabled. |
-| [167eed465](https://github.com/angular/angular-cli/commit/167eed4654be4480c45d7fdfe7a0b9f160170289) | fix(@angular-devkit/build-angular): update Angular peer dependencies to v13.0 prerelease |
-| [7dcfffaff](https://github.com/angular/angular-cli/commit/7dcfffafff6f3d29bbe679a90cdf77b1292fec0b) | feat(@angular-devkit/build-angular): drop support for `karma-coverage-instanbul-reporter` |
-| [f5d019f9d](https://github.com/angular/angular-cli/commit/f5d019f9d6ad6d8fdea37836564d9ee190deb23c) | fix(@angular-devkit/build-angular): avoid attempting to optimize copied JavaScript assets |
-| [8758e4415](https://github.com/angular/angular-cli/commit/8758e4415d7ef6301c4441db0014e24f1cc8d146) | fix(@angular-devkit/build-angular): handle null maps in JavaScript optimizer worker |
-| [f53bf9dc2](https://github.com/angular/angular-cli/commit/f53bf9dc21ee9aa8a682b8a82ee8a9870fa859e1) | feat(@angular-devkit/build-angular): add `type=module` to all scripts tags |
-| [20e48a33c](https://github.com/angular/angular-cli/commit/20e48a33c14a1b0b959ba0a45018df53a3e129c8) | feat(@angular-devkit/build-angular): remove deprecated options |
-| [7576136b2](https://github.com/angular/angular-cli/commit/7576136b2fc8a9173b0a92e2ab14c9bc2559081e) | feat(@angular-devkit/build-angular): remove automatic inclusion of ES5 browser polyfills |
-| [701214d17](https://github.com/angular/angular-cli/commit/701214d174586fe7373b6155024c9b6e97b26377) | feat(@angular-devkit/build-angular): remove differential loading support |
-| [e78f6ab5d](https://github.com/angular/angular-cli/commit/e78f6ab5d8f00338d826c8407ce5c8fca40cf097) | feat(@angular-devkit/build-angular): remove deprecated tslint builder |
-| [ac3fc2752](https://github.com/angular/angular-cli/commit/ac3fc2752f28761e1cd42157b59dcf2364ae5567) | feat(@angular-devkit/build-angular): drop support for `node-sass` |
-| [c1efaa17f](https://github.com/angular/angular-cli/commit/c1efaa17feb1d2911dcdea12688d75086d410bf1) | fix(@angular-devkit/build-angular): calculate valid Angular versions from peerDependencies |
-| [d750c686f](https://github.com/angular/angular-cli/commit/d750c686fd26f3ccfccb039027bd816a91279497) | fix(@angular-devkit/build-angular): add priority to copy-webpack-plugin patterns |
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- |
+| [ea60f0f52](https://github.com/angular/angular-cli/commit/ea60f0f527f2ab8fc5acc967138c4ae993946923) | fix | handle `FORCE_COLOR` when stdout is not instance of `WriteStream` |
-### @angular-devkit/build-webpack
+## Special Thanks
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
-| [615353022](https://github.com/angular/angular-cli/commit/61535302204a2a767f85053b7efaa6ac5ac64098) | fix(@angular-devkit/build-webpack): emit result when webpack is closed |
+Alan Agius
-### @angular-devkit/core
+
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
-| [0c92ea5ca](https://github.com/angular/angular-cli/commit/0c92ea5ca34d82849862d55c4210cf62c819d514) | feat(@angular-devkit/core): remove deprecated schema id handling |
+
-### @angular-devkit/schematics
+# 12.2.5 (2021-09-08)
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
-| [8954d1152](https://github.com/angular/angular-cli/commit/8954d1152b6c1a33dd7d4b63d2fa430d91e7b370) | feat(@angular-devkit/schematics): remove deprecated `isAction` |
-| [053b7d66c](https://github.com/angular/angular-cli/commit/053b7d66c269423804891e4d43d61f8605838e24) | feat(@angular-devkit/schematics): remove deprecated tslint APIs |
+### @angular-devkit/build-angular
-### @ngtools/webpack
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------- |
+| [0498768c5](https://github.com/angular/angular-cli/commit/0498768c54de225a40c28fdf27bb1fc43959ba20) | fix | disable dev-server response compression |
+| [367fce2e9](https://github.com/angular/angular-cli/commit/367fce2e9f9389c41f2ed5361ef6749198c49785) | fix | improve Safari browserslist to esbuild target conversion |
-| Commit | Description |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
-| [d2a97f919](https://github.com/angular/angular-cli/commit/d2a97f9193fcf7e454fe8eb48c0ed732d3b2f24f) | fix(@ngtools/webpack): update Angular peer dependencies to v13.0 prerelease |
+## Special Thanks:
-## Breaking Changes
+Alan Agius and Charles Lyding
-### @schematics/angular
+
-We removed several deprecated `@schematics/angular` deprecated options.
+
-- `lintFix` have been removed from all schematics. `ng lint --fix` should be used instead.
-- `legacyBrowsers` have been removed from the `application` schematics since IE 11 is no longer supported.
-- `configuration` has been removed from the `web-worker` as it was unused.
-- `target` has been removed from the `service-worker` as it was unused.
+# 12.2.4 (2021-09-01)
-### @angular/cli
+### @angular-devkit/build-angular
-We drop support for Node.js versions prior to `12.20`.
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | ------------------------------------------- |
+| [aaadef026](https://github.com/angular/angular-cli/commit/aaadef02698ba729ca04ccd4159bda5b6582babb) | fix | update `esbuild` to `0.12.24` |
+| [f8a9f4a01](https://github.com/angular/angular-cli/commit/f8a9f4a0100286b7cf656ffbe486c3424cad5172) | fix | update `mini-css-extract-plugin` to `2.2.1` |
-### @angular-devkit/build-angular
+## Special Thanks
-Support for `karma-coverage-instanbul-reporter` has been dropped in favor of the official karma coverage plugin `karma-coverage`.
-With this change we removed several deprecated builder options
+Alan Agius
-- `extractCss` has been removed from the browser builder. CSS is now always extracted.
-- `servePathDefaultWarning` and `hmrWarning` have been removed from the dev-server builder. These options had no effect.
+
-The automatic inclusion of Angular-required ES2015 polyfills to support ES5 browsers has been removed. Previously when targetting ES5 within the application's TypeScript configuration or listing an ES5 requiring browser in the browserslist file, Angular-required polyfills were included in the built application. However, with Angular no longer supporting IE11, there are now no browsers officially supported by Angular that would require these polyfills. As a result, the automatic inclusion of these ES2015 polyfills has been removed. Any polyfills manually added to an application's code are not affected by this change.
+
-Differential loading support has been removed. With Angular no longer supporting IE11, there are now no browsers officially supported by Angular that require ES5 code. As a result, differential loading's functionality for creating and conditionally loading ES5 and ES2015+ variants of an application is no longer required.
+# 12.2.3 (2021-08-26)
-Deprecated `@angular-devkit/build-angular:tslint` builder has been removed. Use https://github.com/angular-eslint/angular-eslint instead.
+### @angular-devkit/build-angular
-We remove inlining of Google fonts in WOFF format since IE 11 is no longer supported. Other supported browsers use WOFF2.
+| Commit | Type | Description |
+| --------------------------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------- |
+| [3e3321857](https://github.com/angular/angular-cli/commit/3e33218578007f93a131dc8be569e9985179098f) | fix | RGBA converted to hex notation in component styles breaks IE11 |
-Support for `node-sass` has been removed. `sass` will be used by default to compile SASS and SCSS files.
+## Special Thanks:
-### @angular-devkit/core
+Alan Agius and Trevor Karjanis
-With this change we drop support for the deprecated behaviour to transform `id` in schemas. Use `$id` instead.
+
-Note: this only effects schematics and builders authors.
+
-### @angular-devkit/schematics
+# 12.2.2 (2021-08-18)
-`isAction` has been removed without replacement as it was unused.
+### @angular-devkit/build-angular
-With this change we remove the following deprecated APIs
+| Commit | Description |
+| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
+| [a55118a75](https://github.com/angular/angular-cli/commit/a55118a753555c0082cfd434379559df7e3eb7f9) | fix: provide supported browsers to esbuild |
+| [81baa4f95](https://github.com/angular/angular-cli/commit/81baa4f956443fcc718f9021fd23ab7064d04607) | fix: update Angular peer dependencies to 12.2 stable |
+| [297410ae8](https://github.com/angular/angular-cli/commit/297410ae860860d71905639cf38b49ff05813845) | fix: handle undefined entrypoints when marking async chunks |
-- `TslintFixTask`
-- `TslintFixTaskOptions`
+### @ngtools/webpack
-**Note:** this only effects schematics developers.
+| Commit | Description |
+| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
+| [b7199f366](https://github.com/angular/angular-cli/commit/b7199f366841d976b502ad5f1923e24ea2f6b302) | fix: update Angular peer dependencies to 12.2 stable |
## Special Thanks:
-Alan Agius, Charles Lyding, Doug Parker, Joey Perrott and originalfrostig
+Alan Agius, Charles Lyding, Joey Perrott and Simon Primetzhofer
+
+
@@ -538,6 +618,8 @@ Alan Agius, Charles Lyding, Doug Parker, Joey Perrott and originalfrostig
Alan Agius and Charles Lyding
+
+
# 12.2.0 (2021-08-04)
@@ -611,6 +693,8 @@ Alan Agius and Charles Lyding
Alan Agius, Charles Lyding, David Scourfield, Doug Parker, hien-pham, Joey Perrott, LeonEck, Mike
Jancar, twerske, Vaibhav Singh and originalfrostig
+
+
# 12.2.0-rc.0 (2021-07-28)
@@ -637,6 +721,8 @@ Jancar, twerske, Vaibhav Singh and originalfrostig
Alan Agius, Charles Lyding, Joey Perrott and originalfrostig
+
+
# 12.1.4 (2021-07-28)
@@ -669,6 +755,8 @@ Alan Agius, Charles Lyding, Joey Perrott and originalfrostig
Alan Agius, Charles Lyding, Joey Perrott and originalfrostig
+
+
# 12.2.0-next.3 (2021-07-21)
@@ -691,6 +779,8 @@ Alan Agius, Charles Lyding, Joey Perrott and originalfrostig
Alan Agius, Charles Lyding, Joey Perrott, LeonEck and Mike Jancar
+
+
# 12.1.3 (2021-07-21)
@@ -713,6 +803,8 @@ Alan Agius, Charles Lyding, Joey Perrott, LeonEck and Mike Jancar
Alan Agius, Charles Lyding, Joey Perrott, LeonEck and Mike Jancar
+
+
# v12.2.0-next.2 (2021-07-14)
@@ -1039,6 +1131,8 @@ Alan Agius, Charles Lyding, Joey Perrott, LeonEck and Mike Jancar
Alan Agius, Charles Lyding, Joey Perrott
+
+
# v12.1.2 (2021-07-14)
@@ -1318,6 +1412,8 @@ Alan Agius, Charles Lyding, Joey Perrott
Alan Agius, Charles Lyding, Joey Perrott, Terence D. Honles
+
+
# v12.1.1 (2021-07-01)
@@ -1487,6 +1583,9 @@ Alan Agius, Charles Lyding, Joey Perrott, Terence D. Honles
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker
+
+
+
# v12.2.0-next.1 (2021-07-01)
@@ -1673,6 +1772,9 @@ Alan Agius, Charles Lyding, Doug Parker
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker
+
+
+
# v12.2.0-next.0 (2021-06-24)
@@ -1824,6 +1926,9 @@ Alan Agius, Charles Lyding, Doug Parker
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker, Vaibhav Singh, Joey Perrott, twerske, David Scourfield, hien-pham
+
+
+
# v12.1.0 (2021-06-24)
@@ -2251,6 +2356,9 @@ Alan Agius, Charles Lyding, Doug Parker, Vaibhav Singh, Joey Perrott, twerske, D
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker, Joey Perrott, Bjarki, Vaibhav Singh, twerske, David Scourfield, hien-pham, Alberto Calvo, Paul Gschwendtner, Keen Yee Liau
+
+
+
# v12.1.0-next.6 (2021-06-17)
@@ -2410,6 +2518,9 @@ Alan Agius, Charles Lyding, Doug Parker, Joey Perrott, Bjarki, Vaibhav Singh, tw
# Special Thanks
Alan Agius, Joey Perrott, Alberto Calvo, Charles Lyding
+
+
+
# v12.0.5 (2021-06-17)
@@ -2499,6 +2610,8 @@ Alan Agius, Joey Perrott, Alberto Calvo, Charles Lyding
Alan Agius, Joey Perrott
+
+
# v12.1.0-next.5 (2021-06-10)
@@ -2842,6 +2955,9 @@ Alan Agius, Joey Perrott
# Special Thanks
Charles Lyding, Alan Agius, Doug Parker, Santosh Mahto, Joey Perrott
+
+
+
# v12.0.4 (2021-06-09)
@@ -3125,6 +3241,9 @@ Charles Lyding, Alan Agius, Doug Parker, Santosh Mahto, Joey Perrott
# Special Thanks
Alan Agius, Charles Lyding, Santosh Mahto, Joey Perrott, Doug Parker
+
+
+
# v12.0.3 (2021-06-02)
@@ -3424,6 +3543,9 @@ Alan Agius, Charles Lyding, Santosh Mahto, Joey Perrott, Doug Parker
# Special Thanks
Alan Agius, Doug Parker, Charles Lyding, why520crazy
+
+
+
# v12.1.0-next.4 (2021-06-02)
@@ -3706,6 +3828,9 @@ Alan Agius, Doug Parker, Charles Lyding, why520crazy
# Special Thanks
Alan Agius, Doug Parker, Charles Lyding, why520crazy
+
+
+
# v12.1.0-next.3 (2021-05-26)
@@ -4003,6 +4128,9 @@ Alan Agius, Doug Parker, Charles Lyding, why520crazy
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker, Bjarki, Hassan Sani, JoostK, George Kalpakas, Joey Perrott
+
+
+
# v12.0.2 (2021-05-26)
@@ -4270,6 +4398,9 @@ Alan Agius, Charles Lyding, Doug Parker, Bjarki, Hassan Sani, JoostK, George Kal
# Special Thanks
Alan Agius, Charles Lyding, Doug Parker, Hassan Sani, JoostK, George Kalpakas, Joey Perrott
+
+
+
# v12.0.1 (2021-05-19)
@@ -4641,6 +4772,8 @@ Alan Agius, Charles Lyding, Doug Parker, Hassan Sani, JoostK, George Kalpakas, J
Alan Agius, Charles Lyding, Joey Perrott, Keen Yee Liau, Luca Vazzano, Pankaj Patil, Ryan Lester, Terence D. Honles, Alan Cohen
+
+
# v12.1.0-next.2 (2021-05-19)
@@ -4998,6 +5131,9 @@ Alan Agius, Charles Lyding, Joey Perrott, Keen Yee Liau, Luca Vazzano, Pankaj Pa
# Special Thanks
Alan Agius, Charles Lyding, Joey Perrott, Keen Yee Liau, Luca Vazzano, Pankaj Patil, Ryan Lester, Alan Cohen, Paul Gschwendtner
+
+
+
# v12.0.0 (2021-05-12)
@@ -7022,6 +7158,9 @@ After
# Special Thanks
Alan Agius, Charles Lyding, Keen Yee Liau, Joey Perrott, Doug Parker, Cédric Exbrayat, Douglas Parker, George Kalpakas, Sam Bulatov, Joshua Chapman, Santosh Yadav, David Shevitz, Kristiyan Kostadinov
+
+
+
# v12.0.0-rc.3 (2021-05-10)
@@ -7106,6 +7245,9 @@ Alan Agius, Charles Lyding, Keen Yee Liau, Joey Perrott, Doug Parker, Cédric Ex
# Special Thanks
Alan Agius, Charles Lyding, Joey Perrott
+
+
+
# v12.0.0-rc.2 (2021-05-05)
@@ -7302,6 +7444,9 @@ Alan Agius, Charles Lyding, Joey Perrott
# Special Thanks
Alan Agius, Charles Lyding, Keen Yee Liau, Sam Bulatov, Doug Parker
+
+
+
# v12.0.0-rc.1 (2021-04-28)
@@ -7565,6 +7710,9 @@ Alan Agius, Charles Lyding, Keen Yee Liau, Sam Bulatov, Doug Parker
# Special Thanks
Alan Agius, Charles Lyding, Joey Perrott, Cédric Exbrayat, Doug Parker, Joshua Chapman, Billy Lando, Santosh Yadav, mzocateli
+
+
+
# v12.0.0-rc.0 (2021-04-21)
@@ -7902,6 +8050,9 @@ A number of browser and server builder options have had their default values cha
# Special Thanks
Alan Agius, Charles Lyding, Keen Yee Liau, Joey Perrott, David Shevitz
+
+
+
# v12.0.0-next.9 (2021-04-14)
@@ -8264,6 +8415,9 @@ new Worker(new URL('./app.worker', import.meta.url), ...)
# Special Thanks
Alan Agius, Charles Lyding, Keen Yee Liau, Doug Parker, Douglas Parker
+
+
+
# v12.0.0-next.8 (2021-04-07)
@@ -8380,6 +8534,9 @@ The deprecated `i18nFormat` option has been removed and the `format` option shou
# Special Thanks
Charles Lyding, Renovate Bot, Alan Agius, Doug Parker, Joey Perrott
+
+
+
# v12.0.0-next.7 (2021-04-02)
@@ -8614,6 +8771,9 @@ the application may need to be updated to become Ivy compatible.
# Special Thanks
Charles Lyding, Alan Agius, Renovate Bot, George Kalpakas, Joey Perrott, Keen Yee Liau
+
+
+
# v12.0.0-next.6 (2021-03-24)
@@ -8711,6 +8871,9 @@ Charles Lyding, Alan Agius, Renovate Bot, George Kalpakas, Joey Perrott, Keen Ye
# Special Thanks
Renovate Bot, Alan Agius, Charles Lyding, Keen Yee Liau
+
+
+
# v12.0.0-next.5 (2021-03-18)
@@ -9154,6 +9317,9 @@ A `--skip-confirmation` option has been added to skip the prompt and directly in
# Special Thanks
Alan Agius, Charles Lyding, Renovate Bot, Doug Parker, Cédric Exbrayat, Kristiyan Kostadinov, Mouad Ennaciri, Omar Hasan
+
+
+
# v12.0.0-next.4 (2021-03-10)
@@ -9445,6 +9611,9 @@ The following options which were used to support the above syntax were removed w
# Special Thanks
Alan Agius, Charles Lyding, Renovate Bot, Joey Perrott
+
+
+
# v12.0.0-next.3 (2021-03-03)
@@ -9547,6 +9716,9 @@ See: https://angular.io/guide/workspace-config#optimization-configuration
# Special Thanks
Renovate Bot, Charles Lyding, Alan Agius, Keen Yee Liau, Douglas Parker, twerske
+
+
+
# v12.0.0-next.2 (2021-02-24)
@@ -9689,6 +9861,9 @@ Renovate Bot, Charles Lyding, Alan Agius, Keen Yee Liau, Douglas Parker, twerske
# Special Thanks
Renovate Bot, Charles Lyding, Alan Agius, Doug Parker, Joey Perrott, Jefiozie, George Kalpakas, Keen Yee Liau
+
+
+
# v12.0.0-next.1 (2021-02-17)
@@ -9912,6 +10087,9 @@ Minimum supported `karma` version is `6.0.0`
# Special Thanks
Renovate Bot, Alan Agius, Charles Lyding, Keen Yee Liau, Aravind V Nair
+
+
+
# v12.0.0-next.0 (2021-02-11)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7bfb4b3833b9..bebb81df176a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -253,12 +253,32 @@ Just as in the **subject**, use the imperative, present tense: "change" not "cha
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
-The footer should contain any information about **Breaking Changes** and is also the place to
-reference GitHub issues that this commit **Closes**.
+The footer can contain information about breaking changes and deprecations. It is also the place to reference GitHub issues, Jira tickets, and other PRs that are related to this commit or that this commit will close.
+For example:
-**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
+```
+BREAKING CHANGE:
+
+
+
+
+Fixes #
+```
+
+or
+
+```
+DEPRECATED:
+
+
+
+
+Closes #
+```
+
+Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
-A detailed explanation can be found in this [document][commit-message-format].
+Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
## Signing the CLA
diff --git a/WORKSPACE b/WORKSPACE
index b3102cb724c3..bff6422045cb 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -7,8 +7,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
- sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
- urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
+ sha256 = "cfc289523cf1594598215901154a6c2515e8bf3671fd708264a6f6aefe02bf39",
+ urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.6/rules_nodejs-4.4.6.tar.gz"],
)
# Check the bazel version and download npm dependencies
@@ -31,13 +31,12 @@ check_rules_nodejs_version(minimum_version_string = "2.0.0")
# Setup the Node.js toolchain
node_repositories(
- node_version = "14.16.1",
+ node_version = "14.17.1",
package_json = ["//:package.json"],
)
yarn_install(
name = "npm",
package_json = "//:package.json",
- strict_visibility = False, # Needed for ts-api-guardian. More info about this can be found https://github.com/bazelbuild/rules_nodejs/wiki#strict_visibility-on-yarn_install-and-npm_install-now-defaults-true-2199
yarn_lock = "//:yarn.lock",
)
diff --git a/docs/design/analytics.md b/docs/design/analytics.md
index 1f502b6ea59a..00f5c9d91c15 100644
--- a/docs/design/analytics.md
+++ b/docs/design/analytics.md
@@ -51,7 +51,7 @@ Note: There's a limit of 20 custom dimensions.
| 5 | `Flag: --style` | `string` |
| 6 | `--collection` | `string` |
| 7 | `Flag: --strict` | `boolean` |
-| 8 | `Ivy Enabled` | `boolean` |
+| 8 | `AOT Enabled` | `boolean` |
| 9 | `Flag: --inline-style` | `boolean` |
| 10 | `Flag: --inline-template` | `boolean` |
| 11 | `Flag: --view-encapsulation` | `string` |
diff --git a/goldens/circular-deps/packages.json b/goldens/circular-deps/packages.json
index fe51488c7066..f47d35c030b4 100644
--- a/goldens/circular-deps/packages.json
+++ b/goldens/circular-deps/packages.json
@@ -1 +1,6 @@
-[]
+[
+ [
+ "packages/angular_devkit/build_angular/src/utils/bundle-calculator.ts",
+ "packages/angular_devkit/build_angular/src/webpack/utils/stats.ts"
+ ]
+]
diff --git a/goldens/public-api/angular_devkit/build_angular/src/index.md b/goldens/public-api/angular_devkit/build_angular/src/index.md
index f979056de152..1565e61b9b6a 100644
--- a/goldens/public-api/angular_devkit/build_angular/src/index.md
+++ b/goldens/public-api/angular_devkit/build_angular/src/index.md
@@ -8,12 +8,12 @@ import { BuilderContext } from '@angular-devkit/architect';
import { BuilderOutput } from '@angular-devkit/architect';
import { BuildResult } from '@angular-devkit/build-webpack';
import { ConfigOptions } from 'karma';
+import { Configuration } from 'webpack';
import { DevServerBuildOutput } from '@angular-devkit/build-webpack';
import { json } from '@angular-devkit/core';
import { JsonObject } from '@angular-devkit/core';
import { Observable } from 'rxjs';
import webpack from 'webpack';
-import * as webpack_2 from 'webpack';
import { WebpackLoggingCallback } from '@angular-devkit/build-webpack';
// @public (undocumented)
@@ -133,7 +133,7 @@ export function executeExtractI18nBuilder(options: ExtractI18nBuilderOptions, co
// @public
export function executeKarmaBuilder(options: KarmaBuilderOptions, context: BuilderContext, transforms?: {
- webpackConfiguration?: ExecutionTransformer;
+ webpackConfiguration?: ExecutionTransformer;
karmaOptions?: (options: KarmaConfigOptions) => KarmaConfigOptions;
}): Observable;
diff --git a/goldens/public-api/angular_devkit/build_webpack/src/index.md b/goldens/public-api/angular_devkit/build_webpack/src/index.md
index 312a1a6d319c..eb5031c7f1f8 100644
--- a/goldens/public-api/angular_devkit/build_webpack/src/index.md
+++ b/goldens/public-api/angular_devkit/build_webpack/src/index.md
@@ -24,7 +24,7 @@ export type DevServerBuildOutput = BuildResult & {
address: string;
};
-// @public (undocumented)
+// @public
export interface EmittedFiles {
// (undocumented)
asset?: boolean;
diff --git a/goldens/public-api/angular_devkit/core/node/index.md b/goldens/public-api/angular_devkit/core/node/index.md
index 9369e9a056a3..202bfd1b43ec 100644
--- a/goldens/public-api/angular_devkit/core/node/index.md
+++ b/goldens/public-api/angular_devkit/core/node/index.md
@@ -4,6 +4,8 @@
```ts
+///
+
import { ErrorObject } from 'ajv';
import { Format } from 'ajv';
import { Observable } from 'rxjs';
diff --git a/goldens/public-api/angular_devkit/core/src/index.md b/goldens/public-api/angular_devkit/core/src/index.md
index 864944c96356..d69e42a702fe 100644
--- a/goldens/public-api/angular_devkit/core/src/index.md
+++ b/goldens/public-api/angular_devkit/core/src/index.md
@@ -354,7 +354,7 @@ function dasherize(str: string): string;
function decamelize(str: string): string;
// @public (undocumented)
-export function deepCopy(value: T): T;
+export function deepCopy(value: T): T;
// @public (undocumented)
export type DeepReadonly = T extends (infer R)[] ? DeepReadonlyArray : T extends Function ? T : T extends object ? DeepReadonlyObject : T;
@@ -1073,6 +1073,8 @@ class MultiAnalytics implements Analytics {
// @public
enum NgCliAnalyticsDimensions {
+ // (undocumented)
+ AotEnabled = 8,
// (undocumented)
BuildErrors = 20,
// (undocumented)
@@ -1082,8 +1084,6 @@ enum NgCliAnalyticsDimensions {
// (undocumented)
NgAddCollection = 6,
// (undocumented)
- NgIvyEnabled = 8,
- // (undocumented)
NodeVersion = 4,
// (undocumented)
RamInGigabytes = 3
diff --git a/goldens/public-api/angular_devkit/schematics/src/index.md b/goldens/public-api/angular_devkit/schematics/src/index.md
index 8f359142a890..b9e405ece3ce 100644
--- a/goldens/public-api/angular_devkit/schematics/src/index.md
+++ b/goldens/public-api/angular_devkit/schematics/src/index.md
@@ -4,6 +4,8 @@
```ts
+///
+
import { analytics } from '@angular-devkit/core';
import { BaseException } from '@angular-devkit/core';
import { logging } from '@angular-devkit/core';
diff --git a/goldens/public-api/angular_devkit/schematics/tasks/index.md b/goldens/public-api/angular_devkit/schematics/tasks/index.md
index 959e4c54957d..8cdf3b28a040 100644
--- a/goldens/public-api/angular_devkit/schematics/tasks/index.md
+++ b/goldens/public-api/angular_devkit/schematics/tasks/index.md
@@ -4,6 +4,8 @@
```ts
+///
+
// @public (undocumented)
export class NodePackageInstallTask implements TaskConfigurationGenerator {
constructor(workingDirectory?: string);
diff --git a/goldens/public-api/angular_devkit/schematics/testing/index.md b/goldens/public-api/angular_devkit/schematics/testing/index.md
index 48a4f5a7bb4f..fe471ea10d69 100644
--- a/goldens/public-api/angular_devkit/schematics/testing/index.md
+++ b/goldens/public-api/angular_devkit/schematics/testing/index.md
@@ -4,6 +4,8 @@
```ts
+///
+
import { analytics } from '@angular-devkit/core';
import { logging } from '@angular-devkit/core';
import { Observable } from 'rxjs';
diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js
index c6441e56f47d..1c9bf9f36b99 100644
--- a/lib/bootstrap-local.js
+++ b/lib/bootstrap-local.js
@@ -31,42 +31,6 @@ const compilerOptions = ts.getParsedCommandLineOfConfigFile(
ts.sys,
).options;
-// Check if we need to profile this CLI run.
-let profiler = null;
-if (process.env['DEVKIT_PROFILING']) {
- debugLocal('setup profiling');
- try {
- profiler = require('v8-profiler-node8');
- } catch (err) {
- throw new Error(
- `Could not require 'v8-profiler-node8'. You must install it separetely with` +
- `'npm install v8-profiler-node8 --no-save.\n\nOriginal error:\n\n${err}`,
- );
- }
-
- profiler.startProfiling();
-
- function exitHandler(options, _err) {
- if (options.cleanup) {
- const cpuProfile = profiler.stopProfiling();
- const profileData = JSON.stringify(cpuProfile);
- const filePath = path.resolve(process.cwd(), process.env.DEVKIT_PROFILING) + '.cpuprofile';
-
- debugLocal('saving profiling data');
- console.log(`Profiling data saved in "${filePath}": ${profileData.length} bytes`);
- fs.writeFileSync(filePath, profileData);
- }
-
- if (options.exit) {
- process.exit();
- }
- }
-
- process.on('exit', exitHandler.bind(null, { cleanup: true }));
- process.on('SIGINT', exitHandler.bind(null, { exit: true }));
- process.on('uncaughtException', exitHandler.bind(null, { exit: true }));
-}
-
if (process.env['DEVKIT_LONG_STACK_TRACE']) {
debugLocal('setup long stack trace');
Error.stackTraceLimit = Infinity;
diff --git a/lib/packages.ts b/lib/packages.ts
index fede7bc38f47..4844a370cb64 100644
--- a/lib/packages.ts
+++ b/lib/packages.ts
@@ -86,7 +86,7 @@ function loadPackageJson(p: string) {
case 'engines':
pkg['engines'] = {
'node': '^12.20.0 || ^14.15.0 || >=16.10.0',
- 'npm': '^6.11.0 || ^7.5.6',
+ 'npm': '^6.11.0 || ^7.5.6 || >=8.0.0',
'yarn': '>= 1.13.0',
};
break;
diff --git a/package.json b/package.json
index 18656744250d..8ae3da587ed1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@angular/devkit-repo",
- "version": "13.0.0-next.8",
+ "version": "13.1.0",
"private": true,
"description": "Software Development Kit for Angular",
"bin": {
@@ -26,10 +26,9 @@
"lint": "eslint --cache --max-warnings=0 \"**/*.ts\"",
"templates": "node ./bin/devkit-admin templates",
"validate": "node ./bin/devkit-admin validate",
- "postinstall": "yarn webdriver-update && yarn ngcc && yarn husky install",
+ "postinstall": "yarn webdriver-update && yarn husky install",
"//webdriver-update-README": "ChromeDriver version must match Puppeteer Chromium version, see https://github.com/GoogleChrome/puppeteer/releases http://chromedriver.chromium.org/downloads",
- "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 92.0.4515.107",
- "ngcc": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
+ "webdriver-update": "webdriver-manager update --standalone false --gecko false --versions.chrome 97.0.4692.20",
"public-api:check": "node goldens/public-api/manage.js test",
"public-api:update": "node goldens/public-api/manage.js accept",
"ts-circular-deps:check": "ng-dev ts-circular-deps check --config ./packages/circular-deps-test.conf.js",
@@ -59,51 +58,51 @@
]
},
"resolutions": {
- "**/@types/copy-webpack-plugin/webpack": "5.57.1",
- "ajv-formats/ajv": "8.6.3"
+ "**/@types/copy-webpack-plugin/webpack": "5.65.0",
+ "**/@types/webpack-dev-server/webpack": "5.65.0",
+ "ajv-formats/ajv": "8.8.2"
},
"devDependencies": {
- "@ampproject/remapping": "1.0.1",
- "@angular/animations": "13.0.0-next.13",
- "@angular/cdk": "13.0.0-next.7",
- "@angular/common": "13.0.0-next.13",
- "@angular/compiler": "13.0.0-next.13",
- "@angular/compiler-cli": "13.0.0-next.13",
- "@angular/core": "13.0.0-next.13",
- "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#d008ca5d1aeebd192c7dca25d6eb09b9e69140c6",
- "@angular/forms": "13.0.0-next.13",
- "@angular/localize": "13.0.0-next.13",
- "@angular/material": "13.0.0-next.7",
- "@angular/platform-browser": "13.0.0-next.13",
- "@angular/platform-browser-dynamic": "13.0.0-next.13",
- "@angular/platform-server": "13.0.0-next.13",
- "@angular/router": "13.0.0-next.13",
- "@angular/service-worker": "13.0.0-next.13",
- "@babel/core": "7.15.5",
- "@babel/generator": "7.15.4",
- "@babel/helper-annotate-as-pure": "7.15.4",
- "@babel/plugin-proposal-async-generator-functions": "7.15.4",
- "@babel/plugin-transform-runtime": "7.15.0",
- "@babel/preset-env": "7.15.6",
- "@babel/runtime": "7.15.4",
- "@babel/template": "7.15.4",
+ "@ampproject/remapping": "1.0.2",
+ "@angular/animations": "13.1.0-next.3",
+ "@angular/cdk": "13.1.0",
+ "@angular/common": "13.1.0-next.3",
+ "@angular/compiler": "13.1.0-next.3",
+ "@angular/compiler-cli": "13.1.0-next.3",
+ "@angular/core": "13.1.0-next.3",
+ "@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#b322637be9df2295ba2e885ac372cf74495235fc",
+ "@angular/forms": "13.1.0-next.3",
+ "@angular/localize": "13.1.0-next.3",
+ "@angular/material": "13.1.0",
+ "@angular/platform-browser": "13.1.0-next.3",
+ "@angular/platform-browser-dynamic": "13.1.0-next.3",
+ "@angular/platform-server": "13.1.0-next.3",
+ "@angular/router": "13.1.0-next.3",
+ "@angular/service-worker": "13.1.0-next.3",
+ "@babel/core": "7.16.0",
+ "@babel/generator": "7.16.0",
+ "@babel/helper-annotate-as-pure": "7.16.0",
+ "@babel/plugin-proposal-async-generator-functions": "7.16.4",
+ "@babel/plugin-transform-async-to-generator": "7.16.0",
+ "@babel/plugin-transform-runtime": "7.16.4",
+ "@babel/preset-env": "7.16.4",
+ "@babel/runtime": "7.16.3",
+ "@babel/template": "7.16.0",
"@bazel/bazelisk": "1.10.1",
- "@bazel/buildifier": "4.2.1",
- "@bazel/jasmine": "4.3.0",
- "@bazel/typescript": "4.3.0",
- "@discoveryjs/json-ext": "0.5.5",
- "@jsdevtools/coverage-istanbul-loader": "3.0.5",
- "@types/babel__core": "7.1.16",
+ "@bazel/buildifier": "4.2.4",
+ "@bazel/jasmine": "4.4.6",
+ "@bazel/typescript": "4.4.6",
+ "@discoveryjs/json-ext": "0.5.6",
+ "@types/babel__core": "7.1.17",
"@types/babel__template": "7.4.1",
"@types/cacache": "^15.0.0",
- "@types/caniuse-lite": "^1.0.0",
"@types/copy-webpack-plugin": "^8.0.0",
"@types/debug": "^4.1.2",
"@types/express": "^4.16.0",
"@types/glob": "^7.1.1",
"@types/http-proxy": "^1.17.4",
"@types/inquirer": "^8.0.0",
- "@types/jasmine": "~3.9.0",
+ "@types/jasmine": "~3.10.0",
"@types/karma": "^6.3.0",
"@types/loader-utils": "^2.0.0",
"@types/minimatch": "3.0.5",
@@ -116,36 +115,37 @@
"@types/postcss-preset-env": "^6.7.1",
"@types/progress": "^2.0.3",
"@types/resolve": "^1.17.1",
- "@types/sass": "^1.16.0",
+ "@types/sass": "^1.43.0",
"@types/semver": "^7.0.0",
"@types/text-table": "^0.2.1",
"@types/uuid": "^8.0.0",
- "@types/webpack-dev-server": "^4.0.3",
- "@typescript-eslint/eslint-plugin": "4.33.0",
- "@typescript-eslint/parser": "4.33.0",
+ "@types/webpack-dev-server": "^4.5.0",
+ "@typescript-eslint/eslint-plugin": "5.6.0",
+ "@typescript-eslint/parser": "5.6.0",
"@yarnpkg/lockfile": "1.1.0",
- "ajv": "8.6.3",
+ "ajv": "8.8.2",
"ajv-formats": "2.1.1",
"ansi-colors": "4.1.1",
- "babel-loader": "8.2.2",
+ "babel-loader": "8.2.3",
+ "babel-plugin-istanbul": "6.1.1",
"bootstrap": "^4.0.0",
"browserslist": "^4.9.1",
"cacache": "15.3.0",
- "caniuse-lite": "^1.0.30001032",
+ "chokidar": "^3.5.2",
"circular-dependency-plugin": "5.2.2",
"common-tags": "^1.8.0",
"conventional-commits-parser": "^3.0.0",
- "copy-webpack-plugin": "9.0.1",
- "core-js": "3.18.2",
- "critters": "0.0.10",
- "css-loader": "6.3.0",
+ "copy-webpack-plugin": "10.0.0",
+ "core-js": "3.19.3",
+ "critters": "0.0.15",
+ "css-loader": "6.5.1",
"debug": "^4.1.1",
- "esbuild": "0.13.4",
- "esbuild-wasm": "0.13.4",
- "eslint": "7.32.0",
+ "esbuild": "0.14.2",
+ "esbuild-wasm": "0.14.2",
+ "eslint": "8.4.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-header": "3.1.1",
- "eslint-plugin-import": "2.24.2",
+ "eslint-plugin-import": "2.25.3",
"express": "4.17.1",
"fast-json-stable-stringify": "2.1.0",
"font-awesome": "^4.7.0",
@@ -154,74 +154,76 @@
"glob": "7.2.0",
"http-proxy": "^1.18.1",
"https-proxy-agent": "5.0.0",
- "husky": "7.0.2",
+ "husky": "7.0.4",
+ "ini": "2.0.0",
"inquirer": "8.2.0",
"jasmine": "^3.3.1",
- "jasmine-core": "~3.9.0",
+ "jasmine-core": "~3.10.0",
"jasmine-spec-reporter": "~7.0.0",
"jquery": "^3.3.1",
"jsonc-parser": "3.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
- "karma-coverage": "~2.0.3",
+ "karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"karma-source-map-support": "1.4.0",
"less": "4.1.2",
- "less-loader": "10.0.1",
+ "less-loader": "10.2.0",
"license-checker": "^25.0.0",
- "license-webpack-plugin": "3.0.0",
- "loader-utils": "2.0.0",
+ "license-webpack-plugin": "4.0.0",
+ "loader-utils": "3.2.0",
"magic-string": "0.25.7",
- "mini-css-extract-plugin": "2.4.1",
+ "mini-css-extract-plugin": "2.4.5",
"minimatch": "3.0.4",
"minimist": "^1.2.0",
- "ng-packagr": "13.0.0-next.6",
+ "ng-packagr": "13.1.1",
"node-fetch": "^2.2.0",
- "open": "8.2.1",
+ "npm-package-arg": "8.1.5",
+ "open": "8.4.0",
"ora": "5.4.1",
- "pacote": "12.0.0",
+ "pacote": "12.0.2",
"parse5-html-rewriting-stream": "6.0.1",
"pidtree": "^0.5.0",
- "pidusage": "^2.0.17",
+ "pidusage": "^3.0.0",
"piscina": "3.1.0",
"popper.js": "^1.14.1",
- "postcss": "8.3.9",
+ "postcss": "8.4.4",
"postcss-import": "14.0.2",
- "postcss-loader": "6.1.1",
+ "postcss-loader": "6.2.1",
"postcss-preset-env": "6.7.0",
"prettier": "^2.0.0",
"protractor": "~7.0.0",
- "puppeteer": "10.4.0",
+ "puppeteer": "12.0.1",
"quicktype-core": "6.0.69",
"regenerator-runtime": "0.13.9",
"resolve-url-loader": "4.0.0",
"rxjs": "6.6.7",
- "sass": "1.42.1",
- "sass-loader": "12.1.0",
+ "sass": "1.44.0",
+ "sass-loader": "12.4.0",
"sauce-connect-proxy": "https://saucelabs.com/downloads/sc-4.6.4-linux.tar.gz",
"semver": "7.3.5",
"shelljs": "^0.8.4",
"source-map": "0.7.3",
"source-map-loader": "3.0.0",
- "source-map-support": "0.5.20",
+ "source-map-support": "0.5.21",
"spdx-satisfies": "^5.0.0",
"stylus": "0.55.0",
- "stylus-loader": "6.1.0",
+ "stylus-loader": "6.2.0",
"symbol-observable": "4.0.0",
"tar": "^6.1.6",
"temp": "^0.9.0",
- "terser": "5.9.0",
+ "terser": "5.10.0",
"text-table": "0.2.0",
"tree-kill": "1.2.2",
"ts-node": "^10.0.0",
"tslib": "2.3.1",
- "typescript": "4.4.3",
- "verdaccio": "5.1.6",
+ "typescript": "4.5.2",
+ "verdaccio": "5.3.0",
"verdaccio-auth-memory": "^10.0.0",
- "webpack": "5.57.1",
- "webpack-dev-middleware": "5.2.1",
- "webpack-dev-server": "4.3.1",
+ "webpack": "5.65.0",
+ "webpack-dev-middleware": "5.2.2",
+ "webpack-dev-server": "4.6.0",
"webpack-merge": "5.8.0",
"webpack-subresource-integrity": "5.0.0",
"zone.js": "^0.11.3"
diff --git a/packages/angular/cli/README.md b/packages/angular/cli/README.md
index 954dcd7d702c..ced76bc505d0 100644
--- a/packages/angular/cli/README.md
+++ b/packages/angular/cli/README.md
@@ -234,26 +234,26 @@ For more informations about Node.js debugging in VS Code, see the related [VS Co
In order to investigate performance issues, CPU profiling is often useful.
-To capture a CPU profiling, you can:
+#### Creating a profile
-1. install the v8-profiler-node8 dependency: `npm install v8-profiler-node8 --no-save`
-1. set the NG_CLI_PROFILING Environment variable to the file name you want:
- - on Unix systems (Linux & Mac OS X): ̀`export NG_CLI_PROFILING=my-profile`
- - on Windows: ̀̀`setx NG_CLI_PROFILING my-profile`
+Node.js 16+ users can use the Node.js command line argument `--cpu-prof` to create a CPU profile.
-Then, just run the ng command on which you want to capture a CPU profile.
-You will then obtain a `my-profile.cpuprofile` file in the folder from which you ran the ng command.
+```bash
+node --cpu-prof node_modules/.bin/ng build
+```
+
+In addition to this one, another, more elaborated way to capture a CPU profile using the Chrome Devtools is detailed in https://github.com/angular/angular-cli/issues/8259#issue-269908550.
+
+#### Opening a profile
You can use the Chrome Devtools to process it. To do so:
-1. open `chrome://inspect/#devices` in Chrome
+1. open `chrome://inspect` in Chrome
1. click on "Open dedicated DevTools for Node"
1. go to the "profiler" tab
-1. click on the "Load" button and select the generated .cpuprofile file
+1. click on the "Load" button and select the generated `.cpuprofile` file
1. on the left panel, select the associated file
-In addition to this one, another, more elaborated way to capture a CPU profile using the Chrome Devtools is detailed in https://github.com/angular/angular-cli/issues/8259#issue-269908550.
-
## Documentation
The documentation for the Angular CLI is located on our [documentation website](https://angular.io/cli).
diff --git a/packages/angular/cli/commands/add-impl.ts b/packages/angular/cli/commands/add-impl.ts
index 722fac678db4..b9a520a315e0 100644
--- a/packages/angular/cli/commands/add-impl.ts
+++ b/packages/angular/cli/commands/add-impl.ts
@@ -29,6 +29,16 @@ import { Spinner } from '../utilities/spinner';
import { isTTY } from '../utilities/tty';
import { Schema as AddCommandSchema } from './add';
+/**
+ * The set of packages that should have certain versions excluded from consideration
+ * when attempting to find a compatible version for a package.
+ * The key is a package name and the value is a SemVer range of versions to exclude.
+ */
+const packageVersionExclusions: Record = {
+ // @angular/localize@9.x versions do not have peer dependencies setup
+ '@angular/localize': '9.x',
+};
+
export class AddCommand extends SchematicCommand {
override readonly allowPrivateSchematics = true;
@@ -40,6 +50,7 @@ export class AddCommand extends SchematicCommand {
}
}
+ // eslint-disable-next-line max-lines-per-function
async run(options: AddCommandSchema & Arguments) {
await ensureCompatibleNpm(this.context.root);
@@ -100,7 +111,13 @@ export class AddCommand extends SchematicCommand {
return 1;
}
+ // Start with the version tagged as `latest` if it exists
const latestManifest = packageMetadata.tags['latest'];
+ if (latestManifest) {
+ packageIdentifier = npa.resolve(latestManifest.name, latestManifest.version);
+ }
+
+ // Adjust the version based on name and peer dependencies
if (latestManifest && Object.keys(latestManifest.peerDependencies).length === 0) {
if (latestManifest.name === '@angular/pwa') {
const version = await this.findProjectVersion('@angular/cli');
@@ -113,16 +130,31 @@ export class AddCommand extends SchematicCommand {
) {
packageIdentifier = npa.resolve('@angular/pwa', '0.12');
}
- } else {
- packageIdentifier = npa.resolve(latestManifest.name, latestManifest.version);
}
+
spinner.succeed(
`Found compatible package version: ${colors.grey(packageIdentifier.toString())}.`,
);
} else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) {
// 'latest' is invalid so search for most recent matching package
+ const versionExclusions = packageVersionExclusions[packageMetadata.name];
const versionManifests = Object.values(packageMetadata.versions).filter(
- (value: PackageManifest) => !prerelease(value.version) && !value.deprecated,
+ (value: PackageManifest) => {
+ // Prerelease versions are not stable and should not be considered by default
+ if (prerelease(value.version)) {
+ return false;
+ }
+ // Deprecated versions should not be used or considered
+ if (value.deprecated) {
+ return false;
+ }
+ // Excluded package versions should not be considered
+ if (versionExclusions && satisfies(value.version, versionExclusions)) {
+ return false;
+ }
+
+ return true;
+ },
);
versionManifests.sort((a, b) => rcompare(a.version, b.version, true));
@@ -130,13 +162,13 @@ export class AddCommand extends SchematicCommand {
let newIdentifier;
for (const versionManifest of versionManifests) {
if (!(await this.hasMismatchedPeer(versionManifest))) {
- newIdentifier = npa.resolve(packageIdentifier.name, versionManifest.version);
+ newIdentifier = npa.resolve(versionManifest.name, versionManifest.version);
break;
}
}
if (!newIdentifier) {
- spinner.warn("Unable to find compatible package. Using 'latest'.");
+ spinner.warn("Unable to find compatible package. Using 'latest' tag.");
} else {
packageIdentifier = newIdentifier;
spinner.succeed(
@@ -144,7 +176,6 @@ export class AddCommand extends SchematicCommand {
);
}
} else {
- packageIdentifier = npa.resolve(latestManifest.name, latestManifest.version);
spinner.succeed(
`Found compatible package version: ${colors.grey(packageIdentifier.toString())}.`,
);
diff --git a/packages/angular/cli/commands/config-impl.ts b/packages/angular/cli/commands/config-impl.ts
index 35efbeddecb9..2b6393e5bea8 100644
--- a/packages/angular/cli/commands/config-impl.ts
+++ b/packages/angular/cli/commands/config-impl.ts
@@ -24,7 +24,7 @@ const validCliPaths = new Map<
['cli.analytics', undefined],
['cli.analyticsSharing.tracking', undefined],
- ['cli.analyticsSharing.uuid', (v) => (v ? `${v}` : uuidV4())],
+ ['cli.analyticsSharing.uuid', (v) => (v === '' ? uuidV4() : `${v}`)],
['cli.cache.enabled', undefined],
['cli.cache.environment', undefined],
@@ -84,7 +84,15 @@ function normalizeValue(value: string | undefined | boolean | number): JsonValue
return +valueString;
}
- return parseJson(valueString) ?? value ?? undefined;
+ try {
+ // We use `JSON.parse` instead of `parseJson` because the latter will parse UUIDs
+ // and convert them into a numberic entities.
+ // Example: 73b61974-182c-48e4-b4c6-30ddf08c5c98 -> 73.
+ // These values should never contain comments, therefore using `JSON.parse` is safe.
+ return JSON.parse(valueString);
+ } catch {
+ return value;
+ }
}
export class ConfigCommand extends Command {
diff --git a/packages/angular/cli/commands/deploy-impl.ts b/packages/angular/cli/commands/deploy-impl.ts
index 92b0ecd96f8e..f8e400a2550b 100644
--- a/packages/angular/cli/commands/deploy-impl.ts
+++ b/packages/angular/cli/commands/deploy-impl.ts
@@ -19,7 +19,6 @@ favorite platform.
For example:
ng add @angular/fire
ng add @azure/ng-deploy
- ng add @zeit/ng-deploy
Find more packages on npm https://www.npmjs.com/search?q=ng%20deploy
`;
diff --git a/packages/angular/cli/commands/doc-impl.ts b/packages/angular/cli/commands/doc-impl.ts
index b39665b68abe..4cd4a7a14579 100644
--- a/packages/angular/cli/commands/doc-impl.ts
+++ b/packages/angular/cli/commands/doc-impl.ts
@@ -40,17 +40,13 @@ export class DocCommand extends Command {
/* eslint-disable-next-line import/no-extraneous-dependencies */
const currentNgVersion = (await import('@angular/core')).VERSION.major;
domain = `v${currentNgVersion}.angular.io`;
- } catch (e) {}
+ } catch {}
}
- let searchUrl = `https://${domain}/api?query=${options.keyword}`;
-
- if (options.search) {
- searchUrl = `https://${domain}/docs?search=${options.keyword}`;
- }
-
- await open(searchUrl, {
- wait: false,
- });
+ await open(
+ options.search
+ ? `https://${domain}/api?query=${options.keyword}`
+ : `https://${domain}/docs?search=${options.keyword}`,
+ );
}
}
diff --git a/packages/angular/cli/commands/lint-impl.ts b/packages/angular/cli/commands/lint-impl.ts
index 8067ea26eea4..e9fb4dc801b3 100644
--- a/packages/angular/cli/commands/lint-impl.ts
+++ b/packages/angular/cli/commands/lint-impl.ts
@@ -6,8 +6,11 @@
* found in the LICENSE file at https://angular.io/license
*/
+import { spawnSync } from 'child_process';
+import * as path from 'path';
import { ArchitectCommand } from '../models/architect-command';
import { Arguments } from '../models/interface';
+import { askConfirmation } from '../utilities/prompt';
import { Schema as LintCommandSchema } from './lint';
const MissingBuilder = `
@@ -22,11 +25,33 @@ For example:
export class LintCommand extends ArchitectCommand {
override readonly target = 'lint';
override readonly multiTarget = true;
- override readonly missingTargetError = MissingBuilder;
override async initialize(options: LintCommandSchema & Arguments): Promise {
if (!options.help) {
return super.initialize(options);
}
}
+
+ override async onMissingTarget(): Promise {
+ this.logger.warn(MissingBuilder);
+
+ const shouldAdd = await askConfirmation('Would you like to add ESLint now?', true, false);
+ if (shouldAdd) {
+ // Run `ng add @angular-eslint/schematics`
+ const binPath = path.resolve(__dirname, '../bin/ng.js');
+ const { status, error } = spawnSync(
+ process.execPath,
+ [binPath, 'add', '@angular-eslint/schematics'],
+ {
+ stdio: 'inherit',
+ },
+ );
+
+ if (error) {
+ throw error;
+ }
+
+ return status ?? 0;
+ }
+ }
}
diff --git a/packages/angular/cli/commands/new.md b/packages/angular/cli/commands/new.md
index ca3f14b8d696..135e1b2c108a 100644
--- a/packages/angular/cli/commands/new.md
+++ b/packages/angular/cli/commands/new.md
@@ -5,7 +5,7 @@ All prompts can safely be allowed to default.
- The new workspace folder is given the specified project name, and contains configuration files at the top level.
-- By default, the files for a new initial application (with the same name as the workspace) are placed in the `src/` subfolder. Corresponding end-to-end tests are placed in the `e2e/` subfolder.
+- By default, the files for a new initial application (with the same name as the workspace) are placed in the `src/` subfolder.
- The new application's configuration appears in the `projects` section of the `angular.json` workspace configuration file, under its project name.
diff --git a/packages/angular/cli/commands/update-impl.ts b/packages/angular/cli/commands/update-impl.ts
index 029d3ca6e42c..23aca0a5861e 100644
--- a/packages/angular/cli/commands/update-impl.ts
+++ b/packages/angular/cli/commands/update-impl.ts
@@ -37,11 +37,6 @@ import {
} from '../utilities/package-tree';
import { Schema as UpdateCommandSchema } from './update';
-const NG_VERSION_9_POST_MSG = colors.cyan(
- '\nYour project has been updated to Angular version 9!\n' +
- 'For more info, please see: https://v9.angular.io/guide/updating-to-version-9',
-);
-
const UPDATE_SCHEMATIC_COLLECTION = path.join(
__dirname,
'../src/commands/update/schematic/collection.json',
@@ -57,6 +52,8 @@ const disableVersionCheck =
disableVersionCheckEnv !== '0' &&
disableVersionCheckEnv.toLowerCase() !== 'false';
+const ANGULAR_PACKAGES_REGEXP = /^@(?:angular|nguniversal)\//;
+
export class UpdateCommand extends Command {
public override readonly allowMissingWorkspace = true;
private workflow!: NodeWorkflow;
@@ -194,7 +191,7 @@ export class UpdateCommand extends Command {
): Promise {
const collection = this.workflow.engine.createCollection(collectionPath);
const migrationRange = new semver.Range(
- '>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to,
+ '>' + (semver.prerelease(from) ? from.split('-')[0] + '-0' : from) + ' <=' + to.split('-')[0],
);
const migrations = [];
@@ -272,19 +269,26 @@ export class UpdateCommand extends Command {
async run(options: UpdateCommandSchema & Arguments) {
await ensureCompatibleNpm(this.context.root);
- // Check if the current installed CLI version is older than the latest version.
- if (!disableVersionCheck && (await this.checkCLILatestVersion(options.verbose, options.next))) {
- this.logger.warn(
- `The installed local Angular CLI version is older than the latest ${
- options.next ? 'pre-release' : 'stable'
- } version.\n` + 'Installing a temporary version to perform the update.',
+ // Check if the current installed CLI version is older than the latest compatible version.
+ if (!disableVersionCheck) {
+ const cliVersionToInstall = await this.checkCLIVersion(
+ options['--'],
+ options.verbose,
+ options.next,
);
- return runTempPackageBin(
- `@angular/cli@${options.next ? 'next' : 'latest'}`,
- this.packageManager,
- process.argv.slice(2),
- );
+ if (cliVersionToInstall) {
+ this.logger.warn(
+ 'The installed Angular CLI version is outdated.\n' +
+ `Installing a temporary Angular CLI versioned ${cliVersionToInstall} to perform the update.`,
+ );
+
+ return runTempPackageBin(
+ `@angular/cli@${cliVersionToInstall}`,
+ this.packageManager,
+ process.argv.slice(2),
+ );
+ }
}
const logVerbose = (message: string) => {
@@ -452,8 +456,7 @@ export class UpdateCommand extends Command {
if (migrations.startsWith('../')) {
this.logger.error(
- 'Package contains an invalid migrations field. ' +
- 'Paths outside the package root are not permitted.',
+ 'Package contains an invalid migrations field. Paths outside the package root are not permitted.',
);
return 1;
@@ -479,9 +482,9 @@ export class UpdateCommand extends Command {
}
}
- let success = false;
+ let result: boolean;
if (typeof options.migrateOnly == 'string') {
- success = await this.executeMigration(
+ result = await this.executeMigration(
packageName,
migrations,
options.migrateOnly,
@@ -495,7 +498,7 @@ export class UpdateCommand extends Command {
return 1;
}
- success = await this.executeMigrations(
+ result = await this.executeMigrations(
packageName,
migrations,
from,
@@ -504,20 +507,7 @@ export class UpdateCommand extends Command {
);
}
- if (success) {
- if (
- packageName === '@angular/core' &&
- options.from &&
- +options.from.split('.')[0] < 9 &&
- (options.to || packageNode.version).split('.')[0] === '9'
- ) {
- this.logger.info(NG_VERSION_9_POST_MSG);
- }
-
- return 0;
- }
-
- return 1;
+ return result ? 0 : 1;
}
const requests: {
@@ -607,36 +597,40 @@ export class UpdateCommand extends Command {
return 1;
}
- if (node.package?.name === '@angular/cli') {
- // Migrations for non LTS versions of Angular CLI are no longer included in @schematics/angular v12.
+ if (manifest.version === node.package?.version) {
+ this.logger.info(`Package '${packageName}' is already up to date.`);
+ continue;
+ }
+
+ if (node.package && ANGULAR_PACKAGES_REGEXP.test(node.package.name)) {
+ const { name, version } = node.package;
const toBeInstalledMajorVersion = +manifest.version.split('.')[0];
- const currentMajorVersion = +node.package.version.split('.')[0];
- if (currentMajorVersion < 10 && toBeInstalledMajorVersion >= 12) {
- const updateVersions: Record = {
- 1: 6,
- 6: 7,
- 7: 8,
- 8: 9,
- 9: 10,
- };
-
- const updateTo = updateVersions[currentMajorVersion];
- this.logger.error(
- 'Updating multiple major versions at once is not recommended. ' +
- `Run 'ng update @angular/cli@${updateTo}' in your workspace directory ` +
- `to update to latest '${updateTo}.x' version of '@angular/cli'.\n\n` +
- 'For more information about the update process, see https://update.angular.io/.',
- );
+ const currentMajorVersion = +version.split('.')[0];
+
+ if (toBeInstalledMajorVersion - currentMajorVersion > 1) {
+ // Only allow updating a single version at a time.
+ if (currentMajorVersion < 6) {
+ // Before version 6, the major versions were not always sequential.
+ // Example @angular/core skipped version 3, @angular/cli skipped versions 2-5.
+ this.logger.error(
+ `Updating multiple major versions of '${name}' at once is not supported. Please migrate each major version individually.\n` +
+ `For more information about the update process, see https://update.angular.io/.`,
+ );
+ } else {
+ const nextMajorVersionFromCurrent = currentMajorVersion + 1;
+
+ this.logger.error(
+ `Updating multiple major versions of '${name}' at once is not supported. Please migrate each major version individually.\n` +
+ `Run 'ng update ${name}@${nextMajorVersionFromCurrent}' in your workspace directory ` +
+ `to update to latest '${nextMajorVersionFromCurrent}.x' version of '${name}'.\n\n` +
+ `For more information about the update process, see https://update.angular.io/?v=${currentMajorVersion}.0-${nextMajorVersionFromCurrent}.0`,
+ );
+ }
return 1;
}
}
- if (manifest.version === node.package?.version) {
- this.logger.info(`Package '${packageName}' is already up to date.`);
- continue;
- }
-
packagesToUpdate.push(requestIdentifier.toString());
}
@@ -787,17 +781,6 @@ export class UpdateCommand extends Command {
return 0;
}
}
-
- if (
- migrations.some(
- (m) =>
- m.package === '@angular/core' &&
- m.to.split('.')[0] === '9' &&
- +m.from.split('.')[0] < 9,
- )
- ) {
- this.logger.info(NG_VERSION_9_POST_MSG);
- }
}
return success ? 0 : 1;
@@ -875,14 +858,16 @@ export class UpdateCommand extends Command {
}
/**
- * Checks if the current installed CLI version is older than the latest version.
- * @returns `true` when the installed version is older.
+ * Checks if the current installed CLI version is older or newer than a compatible version.
+ * @returns the version to install or null when there is no update to install.
*/
- private async checkCLILatestVersion(verbose = false, next = false): Promise {
- const installedCLIVersion = VERSION.full;
-
- const LatestCLIManifest = await fetchPackageManifest(
- `@angular/cli@${next ? 'next' : 'latest'}`,
+ private async checkCLIVersion(
+ packagesToUpdate: string[] | undefined,
+ verbose = false,
+ next = false,
+ ): Promise {
+ const { version } = await fetchPackageManifest(
+ `@angular/cli@${this.getCLIUpdateRunnerVersion(packagesToUpdate, next)}`,
this.logger,
{
verbose,
@@ -890,7 +875,38 @@ export class UpdateCommand extends Command {
},
);
- return semver.lt(installedCLIVersion, LatestCLIManifest.version);
+ return VERSION.full === version ? null : version;
+ }
+
+ private getCLIUpdateRunnerVersion(
+ packagesToUpdate: string[] | undefined,
+ next: boolean,
+ ): string | number {
+ if (next) {
+ return 'next';
+ }
+
+ const updatingAngularPackage = packagesToUpdate?.find((r) => ANGULAR_PACKAGES_REGEXP.test(r));
+ if (updatingAngularPackage) {
+ // If we are updating any Angular package we can update the CLI to the target version because
+ // migrations for @angular/core@13 can be executed using Angular/cli@13.
+ // This is same behaviour as `npx @angular/cli@13 update @angular/core@13`.
+
+ // `@angular/cli@13` -> ['', 'angular/cli', '13']
+ // `@angular/cli` -> ['', 'angular/cli']
+ const tempVersion = coerceVersionNumber(updatingAngularPackage.split('@')[2]);
+
+ return semver.parse(tempVersion)?.major ?? 'latest';
+ }
+
+ // When not updating an Angular package we cannot determine which schematic runtime the migration should to be executed in.
+ // Typically, we can assume that the `@angular/cli` was updated previously.
+ // Example: Angular official packages are typically updated prior to NGRX etc...
+ // Therefore, we only update to the latest patch version of the installed major version of the Angular CLI.
+
+ // This is important because we might end up in a scenario where locally Angular v12 is installed, updating NGRX from 11 to 12.
+ // We end up using Angular ClI v13 to run the migrations if we run the migrations using the CLI installed major version + 1 logic.
+ return VERSION.major;
}
}
diff --git a/packages/angular/cli/lib/config/workspace-schema.json b/packages/angular/cli/lib/config/workspace-schema.json
index c0f154bbf786..7edd9da60eb6 100644
--- a/packages/angular/cli/lib/config/workspace-schema.json
+++ b/packages/angular/cli/lib/config/workspace-schema.json
@@ -69,11 +69,12 @@
"tracking": {
"description": "Analytics sharing info tracking ID.",
"type": "string",
- "pattern": "^GA-\\d+-\\d+$"
+ "pattern": "^(GA|UA)?-\\d+-\\d+$"
},
"uuid": {
"description": "Analytics sharing info universally unique identifier.",
- "type": "string"
+ "type": "string",
+ "format": "uuid"
}
}
},
diff --git a/packages/angular/cli/lib/init.ts b/packages/angular/cli/lib/init.ts
index a48f388ba3fe..cf18b8bcd77b 100644
--- a/packages/angular/cli/lib/init.ts
+++ b/packages/angular/cli/lib/init.ts
@@ -73,7 +73,11 @@ import { isWarningEnabled } from '../utilities/config';
if (isGlobalGreater) {
// If using the update command and the global version is greater, use the newer update command
// This allows improvements in update to be used in older versions that do not have bootstrapping
- if (process.argv[2] === 'update') {
+ if (
+ process.argv[2] === 'update' &&
+ cli.VERSION &&
+ cli.VERSION.major - globalVersion.major <= 1
+ ) {
cli = await import('./cli');
} else if (await isWarningEnabled('versionMismatch')) {
// Otherwise, use local version and warn if global is newer than local
diff --git a/packages/angular/cli/models/analytics.ts b/packages/angular/cli/models/analytics.ts
index 4561da846632..1171e801dc49 100644
--- a/packages/angular/cli/models/analytics.ts
+++ b/packages/angular/cli/models/analytics.ts
@@ -174,7 +174,7 @@ export async function promptProjectAnalytics(force = false): Promise {
if (answers.analytics) {
console.log('');
console.log(tags.stripIndent`
- Thank you for sharing anonymous usage data. Would you change your mind, the following
+ Thank you for sharing anonymous usage data. Should you change your mind, the following
command will disable this feature entirely:
${colors.yellow('ng analytics project off')}
diff --git a/packages/angular/cli/models/architect-command.ts b/packages/angular/cli/models/architect-command.ts
index fee7dfcf17f7..713ce5e483b5 100644
--- a/packages/angular/cli/models/architect-command.ts
+++ b/packages/angular/cli/models/architect-command.ts
@@ -9,7 +9,10 @@
import { Architect, Target } from '@angular-devkit/architect';
import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node';
import { json, schema, tags } from '@angular-devkit/core';
+import { existsSync } from 'fs';
+import * as path from 'path';
import { parseJsonSchemaToOptions } from '../utilities/json-schema';
+import { getPackageManager } from '../utilities/package-manager';
import { isPackageNameSafeForAnalytics } from './analytics';
import { BaseCommandOptions, Command } from './command';
import { Arguments, Option } from './interface';
@@ -36,6 +39,23 @@ export abstract class ArchitectCommand<
target: string | undefined;
missingTargetError: string | undefined;
+ protected async onMissingTarget(projectName?: string): Promise {
+ if (this.missingTargetError) {
+ this.logger.fatal(this.missingTargetError);
+
+ return 1;
+ }
+
+ if (projectName) {
+ this.logger.fatal(`Project '${projectName}' does not support the '${this.target}' target.`);
+ } else {
+ this.logger.fatal(`No projects support the '${this.target}' target.`);
+ }
+
+ return 1;
+ }
+
+ // eslint-disable-next-line max-lines-per-function
public override async initialize(options: T & Arguments): Promise {
this._registry = new json.schema.CoreSchemaRegistry();
this._registry.addPostTransform(json.schema.transforms.addUndefinedDefaults);
@@ -84,21 +104,12 @@ export abstract class ArchitectCommand<
}
}
- if (targetProjectNames.length === 0) {
- this.logger.fatal(
- this.missingTargetError || `No projects support the '${this.target}' target.`,
- );
-
- return 1;
- }
-
if (projectName && !targetProjectNames.includes(projectName)) {
- this.logger.fatal(
- this.missingTargetError ||
- `Project '${projectName}' does not support the '${this.target}' target.`,
- );
+ return await this.onMissingTarget(projectName);
+ }
- return 1;
+ if (targetProjectNames.length === 0) {
+ return await this.onMissingTarget();
}
if (!projectName && commandLeftovers && commandLeftovers.length > 0) {
@@ -115,7 +126,19 @@ export abstract class ArchitectCommand<
builderNames.add(builderName);
}
- const builderDesc = await this._architectHost.resolveBuilder(builderName);
+ let builderDesc;
+ try {
+ builderDesc = await this._architectHost.resolveBuilder(builderName);
+ } catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND') {
+ await this.warnOnMissingNodeModules(this.workspace.basePath);
+ this.logger.fatal(`Could not find the '${builderName}' builder's node package.`);
+
+ return 1;
+ }
+ throw e;
+ }
+
const optionDefs = await parseJsonSchemaToOptions(
this._registry,
builderDesc.optionSchema as json.JsonObject,
@@ -193,7 +216,19 @@ export abstract class ArchitectCommand<
project: projectName || (targetProjectNames.length > 0 ? targetProjectNames[0] : ''),
target: this.target,
});
- const builderDesc = await this._architectHost.resolveBuilder(builderConf);
+
+ let builderDesc;
+ try {
+ builderDesc = await this._architectHost.resolveBuilder(builderConf);
+ } catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND') {
+ await this.warnOnMissingNodeModules(this.workspace.basePath);
+ this.logger.fatal(`Could not find the '${builderConf}' builder's node package.`);
+
+ return 1;
+ }
+ throw e;
+ }
this.description.options.push(
...(await parseJsonSchemaToOptions(
@@ -210,6 +245,38 @@ export abstract class ArchitectCommand<
}
}
+ private async warnOnMissingNodeModules(basePath: string): Promise {
+ // Check for a `node_modules` directory (npm, yarn non-PnP, etc.)
+ if (existsSync(path.resolve(basePath, 'node_modules'))) {
+ return;
+ }
+
+ // Check for yarn PnP files
+ if (
+ existsSync(path.resolve(basePath, '.pnp.js')) ||
+ existsSync(path.resolve(basePath, '.pnp.cjs')) ||
+ existsSync(path.resolve(basePath, '.pnp.mjs'))
+ ) {
+ return;
+ }
+
+ const packageManager = await getPackageManager(basePath);
+ let installSuggestion = 'Try installing with ';
+ switch (packageManager) {
+ case 'npm':
+ installSuggestion += `'npm install'`;
+ break;
+ case 'yarn':
+ installSuggestion += `'yarn'`;
+ break;
+ default:
+ installSuggestion += `the project's package manager`;
+ break;
+ }
+
+ this.logger.warn(`Node packages may not be installed. ${installSuggestion}.`);
+ }
+
async run(options: ArchitectCommandOptions & Arguments) {
return await this.runArchitectTarget(options);
}
@@ -219,7 +286,19 @@ export abstract class ArchitectCommand<
// overrides separately (getting the configuration builds the whole project, including
// overrides).
const builderConf = await this._architectHost.getBuilderNameForTarget(target);
- const builderDesc = await this._architectHost.resolveBuilder(builderConf);
+ let builderDesc;
+ try {
+ builderDesc = await this._architectHost.resolveBuilder(builderConf);
+ } catch (e) {
+ if (e.code === 'MODULE_NOT_FOUND') {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ await this.warnOnMissingNodeModules(this.workspace!.basePath);
+ this.logger.fatal(`Could not find the '${builderConf}' builder's node package.`);
+
+ return 1;
+ }
+ throw e;
+ }
const targetOptionArray = await parseJsonSchemaToOptions(
this._registry,
builderDesc.optionSchema as json.JsonObject,
diff --git a/packages/angular/cli/models/schematic-engine-host.ts b/packages/angular/cli/models/schematic-engine-host.ts
index 0c5bc7fe129b..57d678321d76 100644
--- a/packages/angular/cli/models/schematic-engine-host.ts
+++ b/packages/angular/cli/models/schematic-engine-host.ts
@@ -129,10 +129,21 @@ function wrap(
// Provide compatibility modules for older versions of @angular/cdk
return legacyModules[id];
} else if (id.startsWith('@angular-devkit/') || id.startsWith('@schematics/')) {
- // Resolve from inside the `@angular/cli` project
- const packagePath = require.resolve(id);
+ // Files should not redirect `@angular/core` and instead use the direct
+ // dependency if available. This allows old major version migrations to continue to function
+ // even though the latest major version may have breaking changes in `@angular/core`.
+ if (id.startsWith('@angular-devkit/core')) {
+ try {
+ return schematicRequire(id);
+ } catch (e) {
+ if (e.code !== 'MODULE_NOT_FOUND') {
+ throw e;
+ }
+ }
+ }
- return hostRequire(packagePath);
+ // Resolve from inside the `@angular/cli` project
+ return hostRequire(id);
} else if (id.startsWith('.') || id.startsWith('@angular/cdk')) {
// Wrap relative files inside the schematic collection
// Also wrap `@angular/cdk`, it contains helper utilities that import core schematic packages
diff --git a/packages/angular/cli/package.json b/packages/angular/cli/package.json
index 9efe60b16195..7740295977a2 100644
--- a/packages/angular/cli/package.json
+++ b/packages/angular/cli/package.json
@@ -31,15 +31,15 @@
"@schematics/angular": "0.0.0",
"@yarnpkg/lockfile": "1.1.0",
"ansi-colors": "4.1.1",
- "debug": "4.3.2",
+ "debug": "4.3.3",
"ini": "2.0.0",
"inquirer": "8.2.0",
"jsonc-parser": "3.0.0",
"npm-package-arg": "8.1.5",
"npm-pick-manifest": "6.1.1",
- "open": "8.2.1",
+ "open": "8.4.0",
"ora": "5.4.1",
- "pacote": "12.0.0",
+ "pacote": "12.0.2",
"resolve": "1.20.0",
"semver": "7.3.5",
"symbol-observable": "4.0.0",
diff --git a/packages/angular/cli/src/commands/update/schematic/index.ts b/packages/angular/cli/src/commands/update/schematic/index.ts
index e7d7a60752df..a0b92febe48b 100644
--- a/packages/angular/cli/src/commands/update/schematic/index.ts
+++ b/packages/angular/cli/src/commands/update/schematic/index.ts
@@ -418,13 +418,39 @@ function _usageMessage(
const packageGroups = new Map();
const packagesToUpdate = [...infoMap.entries()]
.map(([name, info]) => {
- const tag = options.next
+ let tag = options.next
? info.npmPackageJson['dist-tags']['next']
? 'next'
: 'latest'
: 'latest';
- const version = info.npmPackageJson['dist-tags'][tag];
- const target = info.npmPackageJson.versions[version];
+ let version = info.npmPackageJson['dist-tags'][tag];
+ let target = info.npmPackageJson.versions[version];
+
+ const versionDiff = semver.diff(info.installed.version, version);
+ if (
+ versionDiff !== 'patch' &&
+ versionDiff !== 'minor' &&
+ /^@(?:angular|nguniversal)\//.test(name)
+ ) {
+ const installedMajorVersion = semver.parse(info.installed.version)?.major;
+ const toInstallMajorVersion = semver.parse(version)?.major;
+ if (
+ installedMajorVersion !== undefined &&
+ toInstallMajorVersion !== undefined &&
+ installedMajorVersion < toInstallMajorVersion - 1
+ ) {
+ const nextMajorVersion = `${installedMajorVersion + 1}.`;
+ const nextMajorVersions = Object.keys(info.npmPackageJson.versions)
+ .filter((v) => v.startsWith(nextMajorVersion))
+ .sort((a, b) => (a > b ? -1 : 1));
+
+ if (nextMajorVersions.length) {
+ version = nextMajorVersions[0];
+ target = info.npmPackageJson.versions[version];
+ tag = '';
+ }
+ }
+ }
return {
name,
@@ -434,18 +460,15 @@ function _usageMessage(
target,
};
})
- .filter(({ info, version, target }) => {
- return target && semver.compare(info.installed.version, version) < 0;
- })
- .filter(({ target }) => {
- return target['ng-update'];
- })
+ .filter(
+ ({ info, version, target }) =>
+ target?.['ng-update'] && semver.compare(info.installed.version, version) < 0,
+ )
.map(({ name, info, version, tag, target }) => {
// Look for packageGroup.
- if (target['ng-update'] && target['ng-update']['packageGroup']) {
- const packageGroup = target['ng-update']['packageGroup'];
- const packageGroupName =
- target['ng-update']['packageGroupName'] || target['ng-update']['packageGroup'][0];
+ const packageGroup = target['ng-update']['packageGroup'];
+ if (packageGroup) {
+ const packageGroupName = target['ng-update']['packageGroupName'] || packageGroup[0];
if (packageGroupName) {
if (packageGroups.has(name)) {
return null;
@@ -458,7 +481,9 @@ function _usageMessage(
}
let command = `ng update ${name}`;
- if (tag == 'next') {
+ if (!tag) {
+ command += `@${semver.parse(version)?.major || version}`;
+ } else if (tag == 'next') {
command += ' --next';
}
diff --git a/packages/angular/cli/utilities/spinner.ts b/packages/angular/cli/utilities/spinner.ts
index e641815eedca..3deda119aee5 100644
--- a/packages/angular/cli/utilities/spinner.ts
+++ b/packages/angular/cli/utilities/spinner.ts
@@ -44,7 +44,7 @@ export class Spinner {
}
warn(text?: string): void {
- this.spinner.fail(text && colors.yellowBright(text));
+ this.spinner.warn(text && colors.yellowBright(text));
}
stop(): void {
diff --git a/packages/angular/pwa/BUILD.bazel b/packages/angular/pwa/BUILD.bazel
index 5b7a218b5c96..af8b44ce7f58 100644
--- a/packages/angular/pwa/BUILD.bazel
+++ b/packages/angular/pwa/BUILD.bazel
@@ -6,6 +6,8 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
+load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
+load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
licenses(["notice"]) # MIT
@@ -67,3 +69,18 @@ jasmine_node_test(
name = "pwa_test",
srcs = [":pwa_test_lib"],
)
+
+pkg_npm(
+ name = "npm_package",
+ deps = [
+ ":pwa",
+ ],
+)
+
+pkg_tar(
+ name = "npm_package_archive",
+ srcs = [":npm_package"],
+ extension = "tar.gz",
+ strip_prefix = "./npm_package",
+ tags = ["manual"],
+)
diff --git a/packages/angular_devkit/architect_cli/BUILD.bazel b/packages/angular_devkit/architect_cli/BUILD.bazel
index 2381827d2753..3f846ec99627 100644
--- a/packages/angular_devkit/architect_cli/BUILD.bazel
+++ b/packages/angular_devkit/architect_cli/BUILD.bazel
@@ -1,4 +1,6 @@
load("//tools:defaults.bzl", "ts_library")
+load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
+load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
# Copyright Google Inc. All Rights Reserved.
#
@@ -27,3 +29,18 @@ ts_library(
"@npm//rxjs",
],
)
+
+pkg_npm(
+ name = "npm_package",
+ deps = [
+ ":architect_cli",
+ ],
+)
+
+pkg_tar(
+ name = "npm_package_archive",
+ srcs = [":npm_package"],
+ extension = "tar.gz",
+ strip_prefix = "./npm_package",
+ tags = ["manual"],
+)
diff --git a/packages/angular_devkit/benchmark/package.json b/packages/angular_devkit/benchmark/package.json
index 2ee0afef8960..916c811edfe4 100644
--- a/packages/angular_devkit/benchmark/package.json
+++ b/packages/angular_devkit/benchmark/package.json
@@ -13,7 +13,7 @@
"@angular-devkit/core": "0.0.0",
"ansi-colors": "4.1.1",
"minimist": "1.2.5",
- "pidusage": "2.0.21",
+ "pidusage": "3.0.0",
"pidtree": "0.5.0",
"rxjs": "6.6.7",
"tree-kill": "^1.2.0"
diff --git a/packages/angular_devkit/build_angular/BUILD.bazel b/packages/angular_devkit/build_angular/BUILD.bazel
index 8162eb81ca63..c7840d0fd443 100644
--- a/packages/angular_devkit/build_angular/BUILD.bazel
+++ b/packages/angular_devkit/build_angular/BUILD.bazel
@@ -101,23 +101,24 @@ ts_library(
"//packages/angular_devkit/core/node",
"//packages/ngtools/webpack",
"@npm//@ampproject/remapping",
+ "@npm//@angular/common",
"@npm//@angular/compiler-cli",
"@npm//@angular/core",
"@npm//@angular/localize",
"@npm//@angular/service-worker",
"@npm//@babel/core",
"@npm//@babel/helper-annotate-as-pure",
+ "@npm//@babel/plugin-proposal-async-generator-functions",
+ "@npm//@babel/plugin-transform-async-to-generator",
"@npm//@babel/plugin-transform-runtime",
"@npm//@babel/preset-env",
"@npm//@babel/runtime",
"@npm//@babel/template",
"@npm//@discoveryjs/json-ext",
- "@npm//@jsdevtools/coverage-istanbul-loader",
"@npm//@types/babel__core",
"@npm//@types/babel__template",
"@npm//@types/browserslist",
"@npm//@types/cacache",
- "@npm//@types/caniuse-lite",
"@npm//@types/copy-webpack-plugin",
"@npm//@types/glob",
"@npm//@types/inquirer",
@@ -134,9 +135,9 @@ ts_library(
"@npm//ajv",
"@npm//ansi-colors",
"@npm//babel-loader",
+ "@npm//babel-plugin-istanbul",
"@npm//browserslist",
"@npm//cacache",
- "@npm//caniuse-lite",
"@npm//circular-dependency-plugin",
"@npm//copy-webpack-plugin",
"@npm//core-js",
@@ -147,6 +148,7 @@ ts_library(
"@npm//glob",
"@npm//https-proxy-agent",
"@npm//inquirer",
+ "@npm//jsonc-parser",
"@npm//karma",
"@npm//karma-source-map-support",
"@npm//less",
diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json
index eb0643568d8f..f64f11060f38 100644
--- a/packages/angular_devkit/build_angular/package.json
+++ b/packages/angular_devkit/build_angular/package.json
@@ -6,83 +6,83 @@
"typings": "src/index.d.ts",
"builders": "builders.json",
"dependencies": {
- "@ampproject/remapping": "1.0.1",
+ "@ampproject/remapping": "1.0.2",
"@angular-devkit/architect": "0.0.0",
"@angular-devkit/build-webpack": "0.0.0",
"@angular-devkit/core": "0.0.0",
- "@babel/core": "7.15.5",
- "@babel/generator": "7.15.4",
- "@babel/helper-annotate-as-pure": "7.15.4",
- "@babel/plugin-proposal-async-generator-functions": "7.15.4",
- "@babel/plugin-transform-async-to-generator": "7.14.5",
- "@babel/plugin-transform-runtime": "7.15.0",
- "@babel/preset-env": "7.15.6",
- "@babel/runtime": "7.15.4",
- "@babel/template": "7.15.4",
- "@discoveryjs/json-ext": "0.5.5",
- "@jsdevtools/coverage-istanbul-loader": "3.0.5",
+ "@babel/core": "7.16.0",
+ "@babel/generator": "7.16.0",
+ "@babel/helper-annotate-as-pure": "7.16.0",
+ "@babel/plugin-proposal-async-generator-functions": "7.16.4",
+ "@babel/plugin-transform-async-to-generator": "7.16.0",
+ "@babel/plugin-transform-runtime": "7.16.4",
+ "@babel/preset-env": "7.16.4",
+ "@babel/runtime": "7.16.3",
+ "@babel/template": "7.16.0",
+ "@discoveryjs/json-ext": "0.5.6",
"@ngtools/webpack": "0.0.0",
"ansi-colors": "4.1.1",
- "babel-loader": "8.2.2",
+ "babel-loader": "8.2.3",
+ "babel-plugin-istanbul": "6.1.1",
"browserslist": "^4.9.1",
"cacache": "15.3.0",
- "caniuse-lite": "^1.0.30001032",
"circular-dependency-plugin": "5.2.2",
- "copy-webpack-plugin": "9.0.1",
- "core-js": "3.18.2",
- "critters": "0.0.10",
- "css-loader": "6.3.0",
- "esbuild-wasm": "0.13.4",
+ "copy-webpack-plugin": "10.0.0",
+ "core-js": "3.19.3",
+ "critters": "0.0.15",
+ "css-loader": "6.5.1",
+ "esbuild-wasm": "0.14.2",
"glob": "7.2.0",
"https-proxy-agent": "5.0.0",
"inquirer": "8.2.0",
+ "jsonc-parser": "3.0.0",
"karma-source-map-support": "1.4.0",
"less": "4.1.2",
- "less-loader": "10.0.1",
- "license-webpack-plugin": "3.0.0",
- "loader-utils": "2.0.0",
- "mini-css-extract-plugin": "2.4.1",
+ "less-loader": "10.2.0",
+ "license-webpack-plugin": "4.0.0",
+ "loader-utils": "3.2.0",
+ "mini-css-extract-plugin": "2.4.5",
"minimatch": "3.0.4",
- "open": "8.2.1",
+ "open": "8.4.0",
"ora": "5.4.1",
"parse5-html-rewriting-stream": "6.0.1",
"piscina": "3.1.0",
- "postcss": "8.3.9",
+ "postcss": "8.4.4",
"postcss-import": "14.0.2",
- "postcss-loader": "6.1.1",
+ "postcss-loader": "6.2.1",
"postcss-preset-env": "6.7.0",
"regenerator-runtime": "0.13.9",
"resolve-url-loader": "4.0.0",
"rxjs": "6.6.7",
- "sass": "1.42.1",
- "sass-loader": "12.1.0",
+ "sass": "1.44.0",
+ "sass-loader": "12.4.0",
"semver": "7.3.5",
"source-map-loader": "3.0.0",
- "source-map-support": "0.5.20",
+ "source-map-support": "0.5.21",
"stylus": "0.55.0",
- "stylus-loader": "6.1.0",
- "terser": "5.9.0",
+ "stylus-loader": "6.2.0",
+ "terser": "5.10.0",
"text-table": "0.2.0",
"tree-kill": "1.2.2",
"tslib": "2.3.1",
- "webpack": "5.57.1",
- "webpack-dev-middleware": "5.2.1",
- "webpack-dev-server": "4.3.1",
+ "webpack": "5.65.0",
+ "webpack-dev-middleware": "5.2.2",
+ "webpack-dev-server": "4.6.0",
"webpack-merge": "5.8.0",
"webpack-subresource-integrity": "5.0.0"
},
"optionalDependencies": {
- "esbuild": "0.13.4"
+ "esbuild": "0.14.2"
},
"peerDependencies": {
- "@angular/compiler-cli": "^13.0.0 || ^13.0.0-next",
- "@angular/localize": "^13.0.0 || ^13.0.0-next",
- "@angular/service-worker": "^13.0.0 || ^13.0.0-next",
+ "@angular/compiler-cli": "^13.0.0 || ^13.1.0-next",
+ "@angular/localize": "^13.0.0 || ^13.1.0-next",
+ "@angular/service-worker": "^13.0.0 || ^13.1.0-next",
"karma": "^6.3.0",
- "ng-packagr": "^13.0.0 || ^13.0.0-next",
+ "ng-packagr": "^13.0.0 || ^13.1.0-next",
"protractor": "^7.0.0",
"tailwindcss": "^2.0.0",
- "typescript": "~4.4.3"
+ "typescript": ">=4.4.3 <4.6"
},
"peerDependenciesMeta": {
"@angular/localize": {
diff --git a/packages/angular_devkit/build_angular/src/babel/presets/application.ts b/packages/angular_devkit/build_angular/src/babel/presets/application.ts
index 9abfdb506333..93085bbaa36e 100644
--- a/packages/angular_devkit/build_angular/src/babel/presets/application.ts
+++ b/packages/angular_devkit/build_angular/src/babel/presets/application.ts
@@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
+import type { ɵParsedTranslation } from '@angular/localize/private';
import type {
DiagnosticHandlingStrategy,
Diagnostics,
@@ -35,8 +36,9 @@ export interface ApplicationPresetOptions {
i18n?: {
locale: string;
missingTranslationBehavior?: 'error' | 'warning' | 'ignore';
- translation?: unknown;
- pluginCreators?: I18nPluginCreators;
+ translation?: Record;
+ translationFiles?: string[];
+ pluginCreators: I18nPluginCreators;
};
angularLinker?: {
@@ -47,6 +49,15 @@ export interface ApplicationPresetOptions {
forceES5?: boolean;
forceAsyncTransformation?: boolean;
+ instrumentCode?: {
+ includedBasePath: string;
+ inputSourceMap: unknown;
+ };
+ optimize?: {
+ looseEnums: boolean;
+ pureTopLevel: boolean;
+ wrapDecorators: boolean;
+ };
diagnosticReporter?: DiagnosticReporter;
}
@@ -97,34 +108,23 @@ function createI18nDiagnostics(reporter: DiagnosticReporter | undefined): Diagno
function createI18nPlugins(
locale: string,
- translation: unknown | undefined,
+ translation: Record | undefined,
missingTranslationBehavior: 'error' | 'warning' | 'ignore',
diagnosticReporter: DiagnosticReporter | undefined,
- // TODO_ESM: Make `pluginCreators` required once `@angular/localize` is published with the `tools` entry point
- pluginCreators: I18nPluginCreators | undefined,
+ pluginCreators: I18nPluginCreators,
) {
const diagnostics = createI18nDiagnostics(diagnosticReporter);
const plugins = [];
+ const { makeEs5TranslatePlugin, makeEs2015TranslatePlugin, makeLocalePlugin } = pluginCreators;
+
if (translation) {
- const {
- makeEs2015TranslatePlugin,
- // TODO_ESM: Remove all deep imports once `@angular/localize` is published with the `tools` entry point
- } =
- pluginCreators ??
- require('@angular/localize/src/tools/src/translate/source_files/es2015_translate_plugin');
plugins.push(
makeEs2015TranslatePlugin(diagnostics, translation, {
missingTranslation: missingTranslationBehavior,
}),
);
- const {
- makeEs5TranslatePlugin,
- // TODO_ESM: Remove all deep imports once `@angular/localize` is published with the `tools` entry point
- } =
- pluginCreators ??
- require('@angular/localize/src/tools/src/translate/source_files/es5_translate_plugin');
plugins.push(
makeEs5TranslatePlugin(diagnostics, translation, {
missingTranslation: missingTranslationBehavior,
@@ -132,12 +132,6 @@ function createI18nPlugins(
);
}
- const {
- makeLocalePlugin,
- // TODO_ESM: Remove all deep imports once `@angular/localize` is published with the `tools` entry point
- } =
- pluginCreators ??
- require('@angular/localize/src/tools/src/translate/source_files/locale_plugin');
plugins.push(makeLocalePlugin(locale));
return plugins;
@@ -220,6 +214,34 @@ export default function (api: unknown, options: ApplicationPresetOptions) {
needRuntimeTransform = true;
}
+ if (options.optimize) {
+ if (options.optimize.pureTopLevel) {
+ plugins.push(require('../plugins/pure-toplevel-functions').default);
+ }
+
+ plugins.push(
+ require('../plugins/elide-angular-metadata').default,
+ [
+ require('../plugins/adjust-typescript-enums').default,
+ { loose: options.optimize.looseEnums },
+ ],
+ [
+ require('../plugins/adjust-static-class-members').default,
+ { wrapDecorators: options.optimize.wrapDecorators },
+ ],
+ );
+ }
+
+ if (options.instrumentCode) {
+ plugins.push([
+ require('babel-plugin-istanbul').default,
+ {
+ inputSourceMap: options.instrumentCode.inputSourceMap ?? false,
+ cwd: options.instrumentCode.includedBasePath,
+ },
+ ]);
+ }
+
if (needRuntimeTransform) {
// Babel equivalent to TypeScript's `importHelpers` option
plugins.push([
diff --git a/packages/angular_devkit/build_angular/src/babel/webpack-loader.ts b/packages/angular_devkit/build_angular/src/babel/webpack-loader.ts
index b41bd7f6d7a5..958b0cf7f99b 100644
--- a/packages/angular_devkit/build_angular/src/babel/webpack-loader.ts
+++ b/packages/angular_devkit/build_angular/src/babel/webpack-loader.ts
@@ -12,16 +12,16 @@ import { ScriptTarget } from 'typescript';
import { loadEsmModule } from '../utils/load-esm';
import { ApplicationPresetOptions, I18nPluginCreators } from './presets/application';
-interface AngularCustomOptions extends Pick {
- forceAsyncTransformation: boolean;
- forceES5: boolean;
- optimize?: {
- looseEnums: boolean;
- pureTopLevel: boolean;
- wrapDecorators: boolean;
+interface AngularCustomOptions extends Omit {
+ instrumentCode?: {
+ /** node_modules and test files are always excluded. */
+ excludedPaths: Set;
+ includedBasePath: string;
};
}
+export type AngularBabelLoaderOptions = AngularCustomOptions & Record;
+
// Extract Sourcemap input type from the remapping function since it is not currently exported
type SourceMapInput = Exclude[0], unknown[]>;
@@ -62,7 +62,8 @@ async function requiresLinking(path: string, source: string): Promise {
return needsLinking(path, source);
}
-export default custom(() => {
+// eslint-disable-next-line max-lines-per-function
+export default custom(() => {
const baseOptions = Object.freeze({
babelrc: false,
configFile: false,
@@ -73,28 +74,31 @@ export default custom(() => {
});
return {
- async customOptions({ i18n, scriptTarget, aot, optimize, ...rawOptions }, { source }) {
+ async customOptions(options, { source, map }) {
+ const { i18n, scriptTarget, aot, optimize, instrumentCode, ...rawOptions } =
+ options as AngularBabelLoaderOptions;
+
// Must process file if plugins are added
let shouldProcess = Array.isArray(rawOptions.plugins) && rawOptions.plugins.length > 0;
- const customOptions: AngularCustomOptions = {
+ const customOptions: ApplicationPresetOptions = {
forceAsyncTransformation: false,
forceES5: false,
angularLinker: undefined,
i18n: undefined,
+ instrumentCode: undefined,
};
// Analyze file for linking
if (await requiresLinking(this.resourcePath, source)) {
- if (!linkerPluginCreator) {
- // Load ESM `@angular/compiler-cli/linker/babel` using the TypeScript dynamic import workaround.
- // Once TypeScript provides support for keeping the dynamic import this workaround can be
- // changed to a direct dynamic import.
- const linkerBabelModule = await loadEsmModule<
- typeof import('@angular/compiler-cli/linker/babel')
- >('@angular/compiler-cli/linker/babel');
- linkerPluginCreator = linkerBabelModule.createEs2015LinkerPlugin;
- }
+ // Load ESM `@angular/compiler-cli/linker/babel` using the TypeScript dynamic import workaround.
+ // Once TypeScript provides support for keeping the dynamic import this workaround can be
+ // changed to a direct dynamic import.
+ linkerPluginCreator ??= (
+ await loadEsmModule(
+ '@angular/compiler-cli/linker/babel',
+ )
+ ).createEs2015LinkerPlugin;
customOptions.angularLinker = {
shouldLink: true,
@@ -117,7 +121,7 @@ export default custom(() => {
customOptions.forceAsyncTransformation =
!/[\\/][_f]?esm2015[\\/]/.test(this.resourcePath) && source.includes('async');
}
- shouldProcess ||= customOptions.forceAsyncTransformation || customOptions.forceES5;
+ shouldProcess ||= customOptions.forceAsyncTransformation || customOptions.forceES5 || false;
}
// Analyze for i18n inlining
@@ -131,20 +135,29 @@ export default custom(() => {
// During the transition, this will always attempt to load the entry point for each file.
// This will only occur during prerelease and will be automatically corrected once the new
// entry point exists.
- // TODO_ESM: Make import failure an error once the `tools` entry point exists.
if (i18nPluginCreators === undefined) {
// Load ESM `@angular/localize/tools` using the TypeScript dynamic import workaround.
// Once TypeScript provides support for keeping the dynamic import this workaround can be
// changed to a direct dynamic import.
- try {
- i18nPluginCreators = await loadEsmModule('@angular/localize/tools');
- } catch {}
+ i18nPluginCreators = await loadEsmModule('@angular/localize/tools');
}
customOptions.i18n = {
...(i18n as NonNullable),
pluginCreators: i18nPluginCreators,
};
+
+ // Add translation files as dependencies of the file to support rebuilds
+ // Except for `@angular/core` which needs locale injection but has no translations
+ if (
+ customOptions.i18n.translationFiles &&
+ !/[\\/]@angular[\\/]core/.test(this.resourcePath)
+ ) {
+ for (const file of customOptions.i18n.translationFiles) {
+ this.addDependency(file);
+ }
+ }
+
shouldProcess = true;
}
@@ -163,6 +176,21 @@ export default custom(() => {
shouldProcess = true;
}
+ if (
+ instrumentCode &&
+ !instrumentCode.excludedPaths.has(this.resourcePath) &&
+ !/\.(e2e|spec)\.tsx?$|[\\/]node_modules[\\/]/.test(this.resourcePath) &&
+ this.resourcePath.startsWith(instrumentCode.includedBasePath)
+ ) {
+ // `babel-plugin-istanbul` has it's own includes but we do the below so that we avoid running the the loader.
+ customOptions.instrumentCode = {
+ includedBasePath: instrumentCode.includedBasePath,
+ inputSourceMap: map,
+ };
+
+ shouldProcess = true;
+ }
+
// Add provided loader options to default base options
const loaderOptions: Record = {
...baseOptions,
@@ -184,32 +212,12 @@ export default custom(() => {
return { custom: customOptions, loader: loaderOptions };
},
config(configuration, { customOptions }) {
- const plugins = configuration.options.plugins ?? [];
- if (customOptions.optimize) {
- if (customOptions.optimize.pureTopLevel) {
- plugins.push(require('./plugins/pure-toplevel-functions').default);
- }
-
- plugins.push(
- require('./plugins/elide-angular-metadata').default,
- [
- require('./plugins/adjust-typescript-enums').default,
- { loose: customOptions.optimize.looseEnums },
- ],
- [
- require('./plugins/adjust-static-class-members').default,
- { wrapDecorators: customOptions.optimize.wrapDecorators },
- ],
- );
- }
-
return {
...configuration.options,
// Using `false` disables babel from attempting to locate sourcemaps or process any inline maps.
// The babel types do not include the false option even though it is valid
// eslint-disable-next-line @typescript-eslint/no-explicit-any
inputSourceMap: false as any,
- plugins,
presets: [
...(configuration.options.presets || []),
[
@@ -240,10 +248,16 @@ export default custom(() => {
// `@ampproject/remapping` source map objects but both are compatible with Webpack.
// This method for merging is used because it provides more accurate output
// and is faster while using less memory.
- result.map = remapping(
- [result.map as SourceMapInput, inputSourceMap as SourceMapInput],
- () => null,
- ) as typeof result.map;
+ result.map = {
+ // Convert the SourceMap back to simple plain object.
+ // This is needed because otherwise code-coverage will fail with `don't know how to turn this value into a node`
+ // Which is thrown by Babel if it is invoked again from `istanbul-lib-instrument`.
+ // https://github.com/babel/babel/blob/780aa48d2a34dc55f556843074b6aed45e7eabeb/packages/babel-types/src/converters/valueToNode.ts#L115-L130
+ ...(remapping(
+ [result.map as SourceMapInput, inputSourceMap as SourceMapInput],
+ () => null,
+ ) as typeof result.map),
+ };
}
return result;
diff --git a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts
index f0c039686390..209654a2b9cf 100644
--- a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts
+++ b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts
@@ -294,7 +294,7 @@ describe('AppShell Builder', () => {
const content = virtualFs.fileBufferToString(host.scopedSync().read(normalize(fileName)));
expect(content).toContain('app-shell works!');
- expect(content).toContain('p{color:#000;}');
+ expect(content).toContain('p{color:#000}');
expect(content).toMatch(
//,
);
diff --git a/packages/angular_devkit/build_angular/src/builders/app-shell/index.ts b/packages/angular_devkit/build_angular/src/builders/app-shell/index.ts
index 7891bac64eb3..952d5f392c2e 100644
--- a/packages/angular_devkit/build_angular/src/builders/app-shell/index.ts
+++ b/packages/angular_devkit/build_angular/src/builders/app-shell/index.ts
@@ -114,7 +114,6 @@ async function _renderUniversal(
if (browserOptions.serviceWorker) {
await augmentAppWithServiceWorker(
- normalize(root),
projectRoot,
normalize(outputPath),
browserOptions.baseHref || '/',
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/index.ts b/packages/angular_devkit/build_angular/src/builders/browser/index.ts
index 93df213d6f25..255c07b47f25 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/index.ts
+++ b/packages/angular_devkit/build_angular/src/builders/browser/index.ts
@@ -17,13 +17,16 @@ import { ScriptTarget } from 'typescript';
import webpack from 'webpack';
import { ExecutionTransformer } from '../../transforms';
import {
- BuildBrowserFeatures,
deleteOutputDir,
normalizeAssetPatterns,
normalizeOptimization,
urlJoin,
} from '../../utils';
-import { ThresholdSeverity, checkBudgets } from '../../utils/bundle-calculator';
+import {
+ BudgetCalculatorResult,
+ ThresholdSeverity,
+ checkBudgets,
+} from '../../utils/bundle-calculator';
import { colors } from '../../utils/color';
import { copyAssets } from '../../utils/copy-assets';
import { i18nInlineEmittedFiles } from '../../utils/i18n-inlining';
@@ -38,21 +41,14 @@ import { ensureOutputPaths } from '../../utils/output-paths';
import { generateEntryPoints } from '../../utils/package-chunk-sort';
import { augmentAppWithServiceWorker } from '../../utils/service-worker';
import { Spinner } from '../../utils/spinner';
+import { getSupportedBrowsers } from '../../utils/supported-browsers';
import { assertCompatibleAngularVersion } from '../../utils/version';
import {
generateI18nBrowserWebpackConfigFromContext,
getIndexInputFile,
getIndexOutputFile,
} from '../../utils/webpack-browser-config';
-import {
- getAnalyticsConfig,
- getBrowserConfig,
- getCommonConfig,
- getStatsConfig,
- getStylesConfig,
- getTypeScriptConfig,
- getWorkerConfig,
-} from '../../webpack/configs';
+import { getAnalyticsConfig, getCommonConfig, getStylesConfig } from '../../webpack/configs';
import { markAsyncChunksNonInitial } from '../../webpack/utils/async-chunks';
import { normalizeExtraEntryPoints } from '../../webpack/utils/helpers';
import {
@@ -96,12 +92,8 @@ async function initialize(
const { config, projectRoot, projectSourceRoot, i18n, target } =
await generateI18nBrowserWebpackConfigFromContext(adjustedOptions, context, (wco) => [
getCommonConfig(wco),
- getBrowserConfig(wco),
getStylesConfig(wco),
- getStatsConfig(wco),
getAnalyticsConfig(wco, context),
- getTypeScriptConfig(wco),
- wco.buildOptions.webWorkerTsConfig ? getWorkerConfig(wco) : {},
]);
// Validate asset option values if processed directly
@@ -165,9 +157,7 @@ export function buildWebpackBrowser(
),
);
- const buildBrowserFeatures = new BuildBrowserFeatures(sysProjectRoot);
-
- checkInternetExplorerSupport(buildBrowserFeatures.supportedBrowsers, context.logger);
+ checkInternetExplorerSupport(sysProjectRoot, context.logger);
return {
...(await initialize(options, context, transforms.webpackConfiguration)),
@@ -248,8 +238,9 @@ export function buildWebpackBrowser(
// Check for budget errors and display them to the user.
const budgets = options.budgets;
+ let budgetFailures: BudgetCalculatorResult[] | undefined;
if (budgets?.length) {
- const budgetFailures = checkBudgets(budgets, webpackStats);
+ budgetFailures = [...checkBudgets(budgets, webpackStats)];
for (const { severity, message } of budgetFailures) {
switch (severity) {
case ThresholdSeverity.Warning:
@@ -352,7 +343,6 @@ export function buildWebpackBrowser(
for (const [locale, outputPath] of outputPaths.entries()) {
try {
await augmentAppWithServiceWorker(
- root,
normalize(projectRoot),
normalize(outputPath),
getLocaleBaseHref(i18n, locale) || options.baseHref || '/',
@@ -369,7 +359,7 @@ export function buildWebpackBrowser(
}
}
- webpackStatsLogger(context.logger, webpackStats, config);
+ webpackStatsLogger(context.logger, webpackStats, config, budgetFailures);
return { success: buildSuccess };
}
@@ -430,10 +420,8 @@ function mapEmittedFilesToFileInfo(files: EmittedFiles[] = []): FileInfo[] {
return filteredFiles;
}
-function checkInternetExplorerSupport(
- supportedBrowsers: string[],
- logger: logging.LoggerApi,
-): void {
+function checkInternetExplorerSupport(projectRoot: string, logger: logging.LoggerApi): void {
+ const supportedBrowsers = getSupportedBrowsers(projectRoot);
if (supportedBrowsers.some((b) => b === 'ie 9' || b === 'ie 10' || b === 'ie 11')) {
logger.warn(
`Warning: Support was requested for Internet Explorer in the project's browserslist configuration. ` +
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/schema.json b/packages/angular_devkit/build_angular/src/builders/browser/schema.json
index e6c61bd864c5..54bbdd52bade 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/schema.json
+++ b/packages/angular_devkit/build_angular/src/builders/browser/schema.json
@@ -89,7 +89,7 @@
"inlineCritical": {
"type": "boolean",
"description": "Extract and inline critical CSS definitions to improve first paint time.",
- "default": false
+ "default": true
}
},
"additionalProperties": false
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/specs/bundle-budgets_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/specs/bundle-budgets_spec.ts
deleted file mode 100644
index 03026c7fe09d..000000000000
--- a/packages/angular_devkit/build_angular/src/builders/browser/specs/bundle-budgets_spec.ts
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import { Architect } from '@angular-devkit/architect';
-import { logging } from '@angular-devkit/core';
-import { createArchitect, host } from '../../../testing/test-utils';
-
-describe('Browser Builder bundle budgets', () => {
- const cssExtensions = ['css', 'scss', 'less', 'styl'];
- const targetSpec = { project: 'app', target: 'build' };
- let architect: Architect;
-
- beforeEach(async () => {
- await host.initialize().toPromise();
- architect = (await createArchitect(host.root())).architect;
- });
- afterEach(async () => host.restore().toPromise());
-
- it('accepts valid bundles', async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'allScript', maximumError: '100mb' }],
- };
- const logger = new logging.Logger('');
- const logs: string[] = [];
- logger.subscribe((e) => logs.push(e.message));
-
- const run = await architect.scheduleTarget(targetSpec, overrides, { logger });
- const output = await run.result;
- expect(output.success).toBe(true);
- expect(logs.join()).not.toContain('Warning');
- await run.stop();
- });
-
- it('shows errors', async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'all', maximumError: '100b' }],
- };
-
- const run = await architect.scheduleTarget(targetSpec, overrides);
- const output = await run.result;
- expect(output.success).toBe(false);
- await run.stop();
- });
-
- it('shows warnings', async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'all', minimumWarning: '100mb' }],
- };
- const logger = new logging.Logger('');
- const logs: string[] = [];
- logger.subscribe((e) => logs.push(e.message));
-
- const run = await architect.scheduleTarget(targetSpec, overrides, { logger });
- const output = await run.result;
- expect(output.success).toBe(true);
- expect(logs.join()).toContain('Warning');
- await run.stop();
- });
-
- cssExtensions.forEach((ext) => {
- it(`shows warnings for large component ${ext} when using 'anyComponentStyle' when AOT`, async () => {
- const overrides = {
- aot: true,
- optimization: true,
- budgets: [{ type: 'anyComponentStyle', maximumWarning: '1b' }],
- styles: [`src/styles.${ext}`],
- };
-
- const cssContent = `
- .foo { color: white; padding: 1px; }
- .buz { color: white; padding: 2px; }
- .bar { color: white; padding: 3px; }
- `;
-
- host.writeMultipleFiles({
- [`src/app/app.component.${ext}`]: cssContent,
- [`src/assets/foo.${ext}`]: cssContent,
- [`src/styles.${ext}`]: cssContent,
- });
-
- host.replaceInFile(
- 'src/app/app.component.ts',
- './app.component.css',
- `./app.component.${ext}`,
- );
-
- const logger = new logging.Logger('');
- const logs: string[] = [];
- logger.subscribe((e) => logs.push(e.message));
-
- const run = await architect.scheduleTarget(targetSpec, overrides, { logger });
- const output = await run.result;
- expect(output.success).toBe(true);
- expect(logs.join()).toMatch(`Warning.+app\\.component\\.${ext}`);
- await run.stop();
- });
- });
-
- cssExtensions.forEach((ext) => {
- it(`shows error for large component ${ext} when using 'anyComponentStyle' when AOT`, async () => {
- const overrides = {
- aot: true,
- optimization: true,
- budgets: [{ type: 'anyComponentStyle', maximumError: '1b' }],
- styles: [`src/styles.${ext}`],
- };
-
- const cssContent = `
- .foo { color: white; padding: 1px; }
- .buz { color: white; padding: 2px; }
- .bar { color: white; padding: 3px; }
- `;
-
- host.writeMultipleFiles({
- [`src/app/app.component.${ext}`]: cssContent,
- [`src/assets/foo.${ext}`]: cssContent,
- [`src/styles.${ext}`]: cssContent,
- });
-
- host.replaceInFile(
- 'src/app/app.component.ts',
- './app.component.css',
- `./app.component.${ext}`,
- );
-
- const logger = new logging.Logger('');
- const logs: string[] = [];
- logger.subscribe((e) => logs.push(e.message));
-
- const run = await architect.scheduleTarget(targetSpec, overrides, { logger });
- const output = await run.result;
- expect(output.success).toBe(false);
- expect(logs.join()).toMatch(`Error.+app\\.component\\.${ext}`);
- await run.stop();
- });
- });
-
- describe(`should ignore '.map' files`, () => {
- it(`when 'bundle' budget`, async () => {
- const overrides = {
- optimization: true,
- extractLicenses: true,
- budgets: [{ type: 'bundle', name: 'main', maximumError: '3Kb' }],
- };
-
- const run = await architect.scheduleTarget(targetSpec, overrides);
- const output = await run.result;
- expect(output.success).toBe(true);
- await run.stop();
- });
-
- it(`when 'intial' budget`, async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'initial', maximumError: '1mb' }],
- };
-
- const run = await architect.scheduleTarget(targetSpec, overrides);
- const output = await run.result;
- expect(output.success).toBe(true);
- await run.stop();
- });
-
- it(`when 'all' budget`, async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'all', maximumError: '1mb' }],
- };
-
- const run = await architect.scheduleTarget(targetSpec, overrides);
- const output = await run.result;
- expect(output.success).toBe(true);
- await run.stop();
- });
-
- it(`when 'any' budget`, async () => {
- const overrides = {
- optimization: true,
- budgets: [{ type: 'any', maximumError: '1mb' }],
- };
-
- const run = await architect.scheduleTarget(targetSpec, overrides);
- const output = await run.result;
- expect(output.success).toBe(true);
- await run.stop();
- });
- });
-});
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/specs/lazy-module_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/specs/lazy-module_spec.ts
index 016632feccb2..0631d4a610ec 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/specs/lazy-module_spec.ts
+++ b/packages/angular_devkit/build_angular/src/builders/browser/specs/lazy-module_spec.ts
@@ -152,7 +152,7 @@ describe('Browser Builder lazy modules', () => {
const { files } = await browserBuild(architect, host, target);
expect(files['src_one_ts.js']).not.toBeUndefined();
expect(files['src_two_ts.js']).not.toBeUndefined();
- expect(files['default-node_modules_angular_common_fesm2020_http_mjs.js']).toBeDefined();
+ expect(files['default-node_modules_angular_common_fesm2015_http_mjs.js']).toBeDefined();
});
it(`supports disabling the common bundle`, async () => {
@@ -165,6 +165,6 @@ describe('Browser Builder lazy modules', () => {
const { files } = await browserBuild(architect, host, target, { commonChunk: false });
expect(files['src_one_ts.js']).not.toBeUndefined();
expect(files['src_two_ts.js']).not.toBeUndefined();
- expect(files['default-node_modules_angular_common_fesm2020_http_mjs.js']).toBeUndefined();
+ expect(files['default-node_modules_angular_common_fesm2015_http_mjs.js']).toBeUndefined();
});
});
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/specs/scripts-array_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/specs/scripts-array_spec.ts
index 4897cb211d59..dfa0aaa44cfd 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/specs/scripts-array_spec.ts
+++ b/packages/angular_devkit/build_angular/src/builders/browser/specs/scripts-array_spec.ts
@@ -86,14 +86,14 @@ describe('Browser Builder scripts array', () => {
} as {});
const fileNames = Object.keys(files);
- const scriptsBundle = fileNames.find((n) => /scripts\.[0-9a-f]{20}\.js/.test(n));
+ const scriptsBundle = fileNames.find((n) => /scripts\.[0-9a-f]{16}\.js/.test(n));
expect(scriptsBundle).toBeTruthy();
expect(await files[scriptsBundle || '']).toMatch('var number=2;');
- expect(fileNames.some((n) => /scripts\.[0-9a-f]{20}\.js\.map/.test(n))).toBeTruthy();
- expect(fileNames.some((n) => /renamed-script\.[0-9a-f]{20}\.js/.test(n))).toBeTruthy();
- expect(fileNames.some((n) => /renamed-script\.[0-9a-f]{20}\.js\.map/.test(n))).toBeTruthy();
- expect(fileNames.some((n) => /script\.[0-9a-f]{20}\.js/.test(n))).toBeTruthy();
+ expect(fileNames.some((n) => /scripts\.[0-9a-f]{16}\.js\.map/.test(n))).toBeTruthy();
+ expect(fileNames.some((n) => /renamed-script\.[0-9a-f]{16}\.js/.test(n))).toBeTruthy();
+ expect(fileNames.some((n) => /renamed-script\.[0-9a-f]{16}\.js\.map/.test(n))).toBeTruthy();
+ expect(fileNames.some((n) => /script\.[0-9a-f]{16}\.js/.test(n))).toBeTruthy();
expect(await files['lazy-script.js']).not.toBeUndefined();
expect(await files['lazy-script.js.map']).not.toBeUndefined();
expect(await files['renamed-lazy-script.js']).not.toBeUndefined();
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts
index 29f04ff05c18..71a39f0f3e5c 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts
+++ b/packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts
@@ -317,7 +317,7 @@ describe('Browser Builder styles', () => {
const overrides = { optimization: true };
const { files } = await browserBuild(architect, host, target, overrides);
- expect(await files['styles.css']).not.toContain('/*! important-comment */');
+ expect(await files['styles.css']).toContain('/*! important-comment */');
});
it('supports autoprefixer grid comments in SCSS with optimization true', async () => {
@@ -653,6 +653,28 @@ describe('Browser Builder styles', () => {
});
result = await browserBuild(architect, host, target, { optimization: true });
- expect(await result.files['styles.css']).toContain('rgba(0,0,0,.149)');
+ expect(await result.files['styles.css']).toContain('rgba(0,0,0,.15)');
+ });
+
+ it('works when using the same css file in `styles` and `stylesUrl`', async () => {
+ host.writeMultipleFiles({
+ 'src/styles.css': `
+ div { color: red }
+ `,
+ './src/app/app.component.ts': `
+ import { Component } from '@angular/core';
+
+ @Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['../styles.css']
+ })
+ export class AppComponent {
+ title = 'app';
+ }
+ `,
+ });
+
+ await browserBuild(architect, host, target, { styles: ['src/styles.css'] });
});
});
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/tests/options/bundle-budgets_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/bundle-budgets_spec.ts
new file mode 100644
index 000000000000..9fa3a66852b6
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/bundle-budgets_spec.ts
@@ -0,0 +1,206 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { logging } from '@angular-devkit/core';
+import { lazyModuleFiles, lazyModuleFnImport } from '../../../../testing/test-utils';
+import { buildWebpackBrowser } from '../../index';
+import { Type } from '../../schema';
+import { BASE_OPTIONS, BROWSER_BUILDER_INFO, describeBuilder } from '../setup';
+
+describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
+ const CSS_EXTENSIONS = ['css', 'scss', 'less', 'styl'];
+ const BUDGET_NOT_MET_REGEXP = /Budget .+ was not met by/;
+
+ describe('Option: "bundleBudgets"', () => {
+ it(`should not warn when size is below threshold`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ optimization: true,
+ budgets: [{ type: Type.All, maximumWarning: '100mb' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: 'warn',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`should error when size is above 'maximumError' threshold`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ optimization: true,
+ budgets: [{ type: Type.All, maximumError: '100b' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(false);
+ expect(logs).toContain(
+ jasmine.objectContaining({
+ level: 'error',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`should warn when size is above 'maximumWarning' threshold`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ optimization: true,
+ budgets: [{ type: Type.All, maximumWarning: '100b' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).toContain(
+ jasmine.objectContaining({
+ level: 'warn',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`should warn when lazy bundle is above 'maximumWarning' threshold`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ optimization: true,
+ budgets: [{ type: Type.Bundle, name: 'lazy-lazy-module', maximumWarning: '100b' }],
+ });
+
+ await harness.writeFiles(lazyModuleFiles);
+ await harness.writeFiles(lazyModuleFnImport);
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).toContain(
+ jasmine.objectContaining({
+ level: 'warn',
+ message: jasmine.stringMatching('lazy-lazy-module exceeded maximum budget'),
+ }),
+ );
+ });
+
+ CSS_EXTENSIONS.forEach((ext) => {
+ it(`shows warnings for large component ${ext} when using 'anyComponentStyle' when AOT`, async () => {
+ const cssContent = `
+ .foo { color: white; padding: 1px; }
+ .buz { color: white; padding: 2px; }
+ .bar { color: white; padding: 3px; }
+ `;
+
+ await harness.writeFiles({
+ [`src/app/app.component.${ext}`]: cssContent,
+ [`src/assets/foo.${ext}`]: cssContent,
+ [`src/styles.${ext}`]: cssContent,
+ });
+
+ await harness.modifyFile('src/app/app.component.ts', (content) =>
+ content.replace('app.component.css', `app.component.${ext}`),
+ );
+
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ optimization: true,
+ aot: true,
+ styles: [`src/styles.${ext}`],
+ budgets: [{ type: Type.AnyComponentStyle, maximumWarning: '1b' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).toContain(
+ jasmine.objectContaining({
+ level: 'warn',
+ message: jasmine.stringMatching(new RegExp(`Warning.+app.component.${ext}`)),
+ }),
+ );
+ });
+ });
+
+ describe(`should ignore '.map' files`, () => {
+ it(`when 'bundle' budget`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ sourceMap: true,
+ optimization: true,
+ extractLicenses: true,
+ budgets: [{ type: Type.Bundle, name: 'main', maximumError: '1mb' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: 'error',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`when 'intial' budget`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ sourceMap: true,
+ optimization: true,
+ extractLicenses: true,
+ budgets: [{ type: Type.Initial, name: 'main', maximumError: '1mb' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: 'error',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`when 'all' budget`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ sourceMap: true,
+ optimization: true,
+ extractLicenses: true,
+ budgets: [{ type: Type.All, maximumError: '1mb' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: 'error',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+
+ it(`when 'any' budget`, async () => {
+ harness.useTarget('build', {
+ ...BASE_OPTIONS,
+ sourceMap: true,
+ optimization: true,
+ extractLicenses: true,
+ budgets: [{ type: Type.Any, maximumError: '1mb' }],
+ });
+
+ const { result, logs } = await harness.executeOnce();
+ expect(result?.success).toBe(true);
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: 'error',
+ message: jasmine.stringMatching(BUDGET_NOT_MET_REGEXP),
+ }),
+ );
+ });
+ });
+ });
+});
diff --git a/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts
index a477297a1d21..a8c86d84c9a8 100644
--- a/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts
+++ b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts
@@ -37,10 +37,10 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
.content.toContain(
``,
);
- harness.expectFile('dist/index.html').content.toContain(`body{color:#000;}`);
+ harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
- it(`should not extract critical css when 'optimization' is unset`, async () => {
+ it(`should extract critical css when 'optimization' is unset`, async () => {
harness.useTarget('build', {
...BASE_OPTIONS,
styles: ['src/styles.css'],
@@ -50,10 +50,15 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
const { result } = await harness.executeOnce();
expect(result?.success).toBe(true);
- harness.expectFile('dist/index.html').content.not.toContain(`
- `);
+ `);
});
it('should inline critical css when using deployUrl', async () => {
@@ -85,14 +81,10 @@ describe('InlineCriticalCssProcessor', () => {
``,
);
expect(tags.stripIndents`${content}`).toContain(tags.stripIndents`
-
- `);
+ `);
});
it('should compress inline critical css when minify is enabled', async () => {
@@ -111,6 +103,6 @@ describe('InlineCriticalCssProcessor', () => {
expect(content).toContain(
``,
);
- expect(content).toContain('');
+ expect(content).toContain('');
});
});
diff --git a/packages/angular_devkit/build_angular/src/utils/index.ts b/packages/angular_devkit/build_angular/src/utils/index.ts
index 8e5b242fb8ed..477ee188984b 100644
--- a/packages/angular_devkit/build_angular/src/utils/index.ts
+++ b/packages/angular_devkit/build_angular/src/utils/index.ts
@@ -6,7 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
-export * from './build-browser-features';
export * from './default-progress';
export * from './delete-output-dir';
export * from './run-module-as-observable-fork';
diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts
index 66ad154be17b..a74ca3e34261 100644
--- a/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts
+++ b/packages/angular_devkit/build_angular/src/utils/normalize-builder-schema.ts
@@ -21,6 +21,7 @@ import {
} from './normalize-file-replacements';
import { NormalizedOptimizationOptions, normalizeOptimization } from './normalize-optimization';
import { normalizeSourceMaps } from './normalize-source-maps';
+import { getSupportedBrowsers } from './supported-browsers';
/**
* A normalized browser builder schema.
@@ -65,5 +66,6 @@ export function normalizeBrowserSchema(
// A value of 0 is falsy and will disable polling rather then enable
// 500 ms is a sensible default in this case
poll: options.poll === 0 ? 500 : options.poll,
+ supportedBrowsers: getSupportedBrowsers(getSystemPath(projectRoot)),
};
}
diff --git a/packages/angular_devkit/build_angular/src/utils/normalize-optimization.ts b/packages/angular_devkit/build_angular/src/utils/normalize-optimization.ts
index d270503471d6..9bbf455b86f5 100644
--- a/packages/angular_devkit/build_angular/src/utils/normalize-optimization.ts
+++ b/packages/angular_devkit/build_angular/src/utils/normalize-optimization.ts
@@ -31,8 +31,7 @@ export function normalizeOptimization(
? optimization.styles
: {
minify: !!optimization.styles,
- // inlineCritical is always false unless explictly set.
- inlineCritical: false,
+ inlineCritical: !!optimization.styles,
},
fonts:
typeof optimization.fonts === 'object'
@@ -47,8 +46,7 @@ export function normalizeOptimization(
scripts: optimization,
styles: {
minify: optimization,
- // inlineCritical is always false unless explictly set.
- inlineCritical: false,
+ inlineCritical: optimization,
},
fonts: {
inline: optimization,
diff --git a/packages/angular_devkit/build_angular/src/utils/read-tsconfig.ts b/packages/angular_devkit/build_angular/src/utils/read-tsconfig.ts
index 339af4c97016..0fabccafb863 100644
--- a/packages/angular_devkit/build_angular/src/utils/read-tsconfig.ts
+++ b/packages/angular_devkit/build_angular/src/utils/read-tsconfig.ts
@@ -26,14 +26,9 @@ export async function readTsconfig(
// Load ESM `@angular/compiler-cli` using the TypeScript dynamic import workaround.
// Once TypeScript provides support for keeping the dynamic import this workaround can be
// changed to a direct dynamic import.
- const compilerCliModule = await loadEsmModule<{ readConfiguration: unknown; default: unknown }>(
- '@angular/compiler-cli',
- );
- // If it is not ESM then the functions needed will be stored in the `default` property.
- // TODO_ESM: This can be removed once `@angular/compiler-cli` is ESM only.
- const { formatDiagnostics, readConfiguration } = (
- compilerCliModule.readConfiguration ? compilerCliModule : compilerCliModule.default
- ) as typeof import('@angular/compiler-cli');
+ const { formatDiagnostics, readConfiguration } = await loadEsmModule<
+ typeof import('@angular/compiler-cli')
+ >('@angular/compiler-cli');
const configResult = readConfiguration(tsConfigFullPath);
if (configResult.errors && configResult.errors.length) {
diff --git a/packages/angular_devkit/build_angular/src/utils/service-worker.ts b/packages/angular_devkit/build_angular/src/utils/service-worker.ts
index b75c2a83e99c..fef7d9d45adb 100644
--- a/packages/angular_devkit/build_angular/src/utils/service-worker.ts
+++ b/packages/angular_devkit/build_angular/src/utils/service-worker.ts
@@ -12,7 +12,6 @@ import * as crypto from 'crypto';
import { createReadStream, promises as fs, constants as fsConstants } from 'fs';
import * as path from 'path';
import { pipeline } from 'stream';
-import { pathToFileURL } from 'url';
import { loadEsmModule } from './load-esm';
class CliFilesystem implements Filesystem {
@@ -63,34 +62,17 @@ class CliFilesystem implements Filesystem {
}
export async function augmentAppWithServiceWorker(
- projectRoot: Path,
appRoot: Path,
outputPath: Path,
baseHref: string,
ngswConfigPath?: string,
): Promise {
const distPath = getSystemPath(normalize(outputPath));
- const systemProjectRoot = getSystemPath(projectRoot);
-
- // Find the service worker package
- const workerPath = require.resolve('@angular/service-worker/ngsw-worker.js', {
- paths: [systemProjectRoot],
- });
- // Absolute paths on Windows must be `file://` URLs when using ESM. Otherwise,
- // `c:` would be interpreted as a protocol instead of a drive letter.
- const swConfigPath = pathToFileURL(
- require.resolve('@angular/service-worker/config', {
- paths: [systemProjectRoot],
- }),
- );
// Determine the configuration file path
- let configPath;
- if (ngswConfigPath) {
- configPath = getSystemPath(normalize(ngswConfigPath));
- } else {
- configPath = path.join(getSystemPath(appRoot), 'ngsw-config.json');
- }
+ const configPath = ngswConfigPath
+ ? getSystemPath(normalize(ngswConfigPath))
+ : path.join(getSystemPath(appRoot), 'ngsw-config.json');
// Read the configuration file
let config: Config | undefined;
@@ -113,7 +95,9 @@ export async function augmentAppWithServiceWorker(
// Once TypeScript provides support for keeping the dynamic import this workaround can be
// changed to a direct dynamic import.
const GeneratorConstructor = (
- await loadEsmModule(swConfigPath)
+ await loadEsmModule(
+ '@angular/service-worker/config',
+ )
).Generator;
// Generate the manifest
@@ -124,6 +108,9 @@ export async function augmentAppWithServiceWorker(
const manifest = JSON.stringify(output, null, 2);
await fs.writeFile(path.join(distPath, 'ngsw.json'), manifest);
+ // Find the service worker package
+ const workerPath = require.resolve('@angular/service-worker/ngsw-worker.js');
+
// Write the worker code
await fs.copyFile(
workerPath,
diff --git a/packages/angular_devkit/build_angular/src/utils/supported-browsers.ts b/packages/angular_devkit/build_angular/src/utils/supported-browsers.ts
new file mode 100644
index 000000000000..a3e750a29806
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/utils/supported-browsers.ts
@@ -0,0 +1,22 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import browserslist from 'browserslist';
+
+export function getSupportedBrowsers(projectRoot: string): string[] {
+ browserslist.defaults = [
+ 'last 1 Chrome version',
+ 'last 1 Firefox version',
+ 'last 2 Edge major versions',
+ 'last 2 Safari major versions',
+ 'last 2 iOS major versions',
+ 'Firefox ESR',
+ ];
+
+ return browserslist(undefined, { path: projectRoot });
+}
diff --git a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts
index 87610285b605..1bdcfbc4f534 100644
--- a/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts
+++ b/packages/angular_devkit/build_angular/src/utils/webpack-browser-config.ts
@@ -29,6 +29,7 @@ export async function generateWebpackConfig(
workspaceRoot: string,
projectRoot: string,
sourceRoot: string | undefined,
+ projectName: string,
options: NormalizedBrowserBuilderSchema,
webpackPartialGenerator: WebpackPartialGenerator,
logger: logging.LoggerApi,
@@ -54,6 +55,7 @@ export async function generateWebpackConfig(
buildOptions,
tsConfig,
tsConfigPath,
+ projectName,
scriptTarget,
};
@@ -164,6 +166,7 @@ export async function generateBrowserWebpackConfigFromContext(
getSystemPath(workspaceRoot),
getSystemPath(projectRoot),
sourceRoot && getSystemPath(sourceRoot),
+ projectName,
normalizedOptions,
webpackPartialGenerator,
context.logger,
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/analytics.ts b/packages/angular_devkit/build_angular/src/webpack/configs/analytics.ts
index e640c5221a8c..06bbf2d5d505 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/analytics.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/configs/analytics.ts
@@ -28,6 +28,13 @@ export function getAnalyticsConfig(
// The category is the builder name if it's an angular builder.
return {
- plugins: [new NgBuildAnalyticsPlugin(wco.projectRoot, context.analytics, category, true)],
+ plugins: [
+ new NgBuildAnalyticsPlugin(
+ wco.projectRoot,
+ context.analytics,
+ category,
+ wco.buildOptions.aot ?? false,
+ ),
+ ],
};
}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/browser.ts b/packages/angular_devkit/build_angular/src/webpack/configs/browser.ts
deleted file mode 100644
index ffac76c8c522..000000000000
--- a/packages/angular_devkit/build_angular/src/webpack/configs/browser.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import * as webpack from 'webpack';
-import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
-import { WebpackConfigOptions } from '../../utils/build-options';
-import { CommonJsUsageWarnPlugin } from '../plugins';
-import { getSourceMapDevTool } from '../utils/helpers';
-
-export function getBrowserConfig(wco: WebpackConfigOptions): webpack.Configuration {
- const { buildOptions } = wco;
- const {
- crossOrigin = 'none',
- subresourceIntegrity,
- vendorChunk,
- commonChunk,
- allowedCommonJsDependencies,
- } = buildOptions;
-
- const extraPlugins = [];
-
- const {
- styles: stylesSourceMap,
- scripts: scriptsSourceMap,
- hidden: hiddenSourceMap,
- } = buildOptions.sourceMap;
-
- if (subresourceIntegrity) {
- extraPlugins.push(
- new SubresourceIntegrityPlugin({
- hashFuncNames: ['sha384'],
- }),
- );
- }
-
- if (scriptsSourceMap || stylesSourceMap) {
- extraPlugins.push(
- getSourceMapDevTool(scriptsSourceMap, stylesSourceMap, hiddenSourceMap, false),
- );
- }
-
- let crossOriginLoading: 'anonymous' | 'use-credentials' | false = false;
- if (subresourceIntegrity && crossOrigin === 'none') {
- crossOriginLoading = 'anonymous';
- } else if (crossOrigin !== 'none') {
- crossOriginLoading = crossOrigin;
- }
-
- return {
- devtool: false,
- resolve: {
- mainFields: ['es2020', 'es2015', 'browser', 'module', 'main'],
- conditionNames: ['es2020', 'es2015', '...'],
- },
- output: {
- crossOriginLoading,
- trustedTypes: 'angular#bundler',
- scriptType: 'module',
- },
- optimization: {
- runtimeChunk: 'single',
- splitChunks: {
- maxAsyncRequests: Infinity,
- cacheGroups: {
- default: !!commonChunk && {
- chunks: 'async',
- minChunks: 2,
- priority: 10,
- },
- common: !!commonChunk && {
- name: 'common',
- chunks: 'async',
- minChunks: 2,
- enforce: true,
- priority: 5,
- },
- vendors: false,
- defaultVendors: !!vendorChunk && {
- name: 'vendor',
- chunks: (chunk) => chunk.name === 'main',
- enforce: true,
- test: /[\\/]node_modules[\\/]/,
- },
- },
- },
- },
- plugins: [
- new CommonJsUsageWarnPlugin({
- allowedDependencies: allowedCommonJsDependencies,
- }),
- ...extraPlugins,
- ],
- node: false,
- };
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts
index 51686b72802e..3d24edec28e9 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/common.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/configs/common.ts
@@ -6,41 +6,84 @@
* found in the LICENSE file at https://angular.io/license
*/
-import CopyWebpackPlugin, { ObjectPattern } from 'copy-webpack-plugin';
-import { createHash } from 'crypto';
-import { createWriteStream, existsSync, promises as fsPromises } from 'fs';
+import { AngularWebpackLoaderPath } from '@ngtools/webpack';
+import CopyWebpackPlugin from 'copy-webpack-plugin';
import * as path from 'path';
import { ScriptTarget } from 'typescript';
import {
Compiler,
Configuration,
ContextReplacementPlugin,
- ProgressPlugin,
RuleSetRule,
- WebpackOptionsNormalized,
- debug,
+ SourceMapDevToolPlugin,
} from 'webpack';
-import { AssetPatternClass } from '../../builders/browser/schema';
-import { BuildBrowserFeatures } from '../../utils';
+import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
+import { AngularBabelLoaderOptions } from '../../babel/webpack-loader';
import { WebpackConfigOptions } from '../../utils/build-options';
-import { allowMangle, profilingEnabled } from '../../utils/environment-options';
+import { allowMangle } from '../../utils/environment-options';
import { loadEsmModule } from '../../utils/load-esm';
-import { Spinner } from '../../utils/spinner';
-import { addError } from '../../utils/webpack-diagnostics';
-import { DedupeModuleResolvePlugin, ScriptsWebpackPlugin } from '../plugins';
-import { JavaScriptOptimizerPlugin } from '../plugins/javascript-optimizer-plugin';
-import { getOutputHashFormat, getWatchOptions, normalizeExtraEntryPoints } from '../utils/helpers';
+import {
+ CommonJsUsageWarnPlugin,
+ DedupeModuleResolvePlugin,
+ JavaScriptOptimizerPlugin,
+ JsonStatsPlugin,
+ ScriptsWebpackPlugin,
+} from '../plugins';
+import { NamedChunksPlugin } from '../plugins/named-chunks-plugin';
+import { ProgressPlugin } from '../plugins/progress-plugin';
+import { TransferSizePlugin } from '../plugins/transfer-size-plugin';
+import { createIvyPlugin } from '../plugins/typescript';
+import {
+ assetPatterns,
+ externalizePackages,
+ getCacheSettings,
+ getInstrumentationExcludedPaths,
+ getMainFieldsAndConditionNames,
+ getOutputHashFormat,
+ getStatsOptions,
+ globalScriptsByBundleName,
+} from '../utils/helpers';
// eslint-disable-next-line max-lines-per-function
export async function getCommonConfig(wco: WebpackConfigOptions): Promise {
- const { root, projectRoot, buildOptions, tsConfig } = wco;
+ const {
+ root,
+ projectRoot,
+ buildOptions,
+ tsConfig,
+ projectName,
+ sourceRoot,
+ tsConfigPath,
+ scriptTarget,
+ } = wco;
const {
cache,
+ codeCoverage,
+ crossOrigin = 'none',
platform = 'browser',
- sourceMap: { styles: stylesSourceMap, scripts: scriptsSourceMap, vendor: vendorSourceMap },
+ aot = true,
+ codeCoverageExclude = [],
+ main,
+ polyfills,
+ sourceMap: {
+ styles: stylesSourceMap,
+ scripts: scriptsSourceMap,
+ vendor: vendorSourceMap,
+ hidden: hiddenSourceMap,
+ },
optimization: { styles: stylesOptimization, scripts: scriptsOptimization },
+ commonChunk,
+ vendorChunk,
+ subresourceIntegrity,
+ verbose,
+ poll,
+ webWorkerTsConfig,
+ externalDependencies = [],
+ allowedCommonJsDependencies,
+ bundleDependencies,
} = buildOptions;
+ const isPlatformServer = buildOptions.platform === 'server';
const extraPlugins: { apply(compiler: Compiler): void }[] = [];
const extraRules: RuleSetRule[] = [];
const entryPoints: { [key: string]: [string, ...string[]] } = {};
@@ -48,53 +91,17 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise('@angular/compiler-cli');
- // If it is not ESM then the values needed will be stored in the `default` property.
- // TODO_ESM: This can be removed once `@angular/compiler-cli` is ESM only.
const {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
VERSION: NG_VERSION,
- } = (
- compilerCliModule.GLOBAL_DEFS_FOR_TERSER ? compilerCliModule : compilerCliModule.default
- ) as typeof import('@angular/compiler-cli');
+ } = await loadEsmModule('@angular/compiler-cli');
// determine hashing format
const hashFormat = getOutputHashFormat(buildOptions.outputHashing || 'none');
- const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot);
if (buildOptions.progress) {
- const spinner = new Spinner();
- spinner.start(`Generating ${platform} application bundles (phase: setup)...`);
-
- extraPlugins.push(
- new ProgressPlugin({
- handler: (percentage: number, message: string) => {
- const phase = message ? ` (phase: ${message})` : '';
- spinner.text = `Generating ${platform} application bundles${phase}...`;
-
- switch (percentage) {
- case 1:
- if (spinner.isSpinning) {
- spinner.succeed(
- `${platform.replace(/^\w/, (s) =>
- s.toUpperCase(),
- )} application bundle generation complete.`,
- );
- }
- break;
- case 0:
- if (!spinner.isSpinning) {
- spinner.start();
- }
- break;
- }
- },
- }),
- );
+ extraPlugins.push(new ProgressPlugin(platform));
}
if (buildOptions.main) {
@@ -102,7 +109,12 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise {
- const { bundleName, inject, input } = curr;
- let resolvedPath = path.resolve(root, input);
-
- if (!existsSync(resolvedPath)) {
- try {
- resolvedPath = require.resolve(input, { paths: [root] });
- } catch {
- throw new Error(`Script file ${input} does not exist.`);
- }
- }
-
- const existingEntry = prev.find((el) => el.bundleName === bundleName);
- if (existingEntry) {
- if (existingEntry.inject && !inject) {
- // All entries have to be lazy for the bundle to be lazy.
- throw new Error(`The ${bundleName} bundle is mixing injected and non-injected scripts.`);
- }
-
- existingEntry.paths.push(resolvedPath);
- } else {
- prev.push({
- bundleName,
- inject,
- paths: [resolvedPath],
- });
- }
-
- return prev;
- }, []);
-
// Add a new asset for each entry.
- for (const script of globalScriptsByBundleName) {
+ for (const { bundleName, inject, paths } of globalScriptsByBundleName(
+ root,
+ buildOptions.scripts,
+ )) {
// Lazy scripts don't get a hash, otherwise they can't be loaded by name.
- const hash = script.inject ? hashFormat.script : '';
- const bundleName = script.bundleName;
+ const hash = inject ? hashFormat.script : '';
extraPlugins.push(
new ScriptsWebpackPlugin({
name: bundleName,
sourceMap: scriptsSourceMap,
+ scripts: paths,
filename: `${path.basename(bundleName)}${hash}.js`,
- scripts: script.paths,
basePath: projectRoot,
}),
);
@@ -184,47 +166,9 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise {
- // Resolve input paths relative to workspace root and add slash at the end.
- // eslint-disable-next-line prefer-const
- let { input, output, ignore = [], glob } = asset;
- input = path.resolve(root, input).replace(/\\/g, '/');
- input = input.endsWith('/') ? input : input + '/';
- output = output.endsWith('/') ? output : output + '/';
-
- if (output.startsWith('..')) {
- throw new Error('An asset cannot be written to a location outside of the output path.');
- }
-
- return {
- context: input,
- // Now we remove starting slash to make Webpack place it from the output root.
- to: output.replace(/^\//, ''),
- from: glob,
- noErrorOnMissing: true,
- force: true,
- globOptions: {
- dot: true,
- followSymbolicLinks: !!asset.followSymlinks,
- ignore: [
- '.gitkeep',
- '**/.DS_Store',
- '**/Thumbs.db',
- // Negate patterns needs to be absolute because copy-webpack-plugin uses absolute globs which
- // causes negate patterns not to match.
- // See: https://github.com/webpack-contrib/copy-webpack-plugin/issues/498#issuecomment-639327909
- ...ignore,
- ].map((i) => path.posix.join(input, i)),
- },
- priority: index,
- };
- },
- );
-
extraPlugins.push(
new CopyWebpackPlugin({
- patterns: copyWebpackPluginPatterns,
+ patterns: assetPatterns(root, buildOptions.assets),
}),
);
}
@@ -253,33 +197,42 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise {
- const { stringifyStream } = await import('@discoveryjs/json-ext');
- const data = stats.toJson('verbose');
- const statsOutputPath = path.resolve(root, buildOptions.outputPath, 'stats.json');
+ new SourceMapDevToolPlugin({
+ filename: '[file].map',
+ include,
+ // We want to set sourceRoot to `webpack:///` for non
+ // inline sourcemaps as otherwise paths to sourcemaps will be broken in browser
+ // `webpack:///` is needed for Visual Studio breakpoints to work properly as currently
+ // there is no way to set the 'webRoot'
+ sourceRoot: 'webpack:///',
+ moduleFilenameTemplate: '[resource-path]',
+ append: hiddenSourceMap ? false : undefined,
+ }),
+ );
+ }
- try {
- await fsPromises.mkdir(path.dirname(statsOutputPath), { recursive: true });
+ if (buildOptions.statsJson) {
+ extraPlugins.push(
+ new JsonStatsPlugin(path.resolve(root, buildOptions.outputPath, 'stats.json')),
+ );
+ }
- await new Promise((resolve, reject) =>
- stringifyStream(data)
- .pipe(createWriteStream(statsOutputPath))
- .on('close', resolve)
- .on('error', reject),
- );
- } catch (error) {
- addError(
- stats.compilation,
- `Unable to write stats file: ${error.message || 'unknown error'}`,
- );
- }
- });
- }
- })(),
+ if (subresourceIntegrity) {
+ extraPlugins.push(
+ new SubresourceIntegrityPlugin({
+ hashFuncNames: ['sha384'],
+ }),
);
}
@@ -303,26 +256,58 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise
+ externalizePackages(context ?? wco.projectRoot, request, callback),
+ );
+ }
+
+ let crossOriginLoading: NonNullable['crossOriginLoading'] = false;
+ if (subresourceIntegrity && crossOrigin === 'none') {
+ crossOriginLoading = 'anonymous';
+ } else if (crossOrigin !== 'none') {
+ crossOriginLoading = crossOrigin;
+ }
+
return {
mode: scriptsOptimization || stylesOptimization.minify ? 'production' : 'development',
devtool: false,
target: [
- platform === 'server' ? 'node' : 'web',
- tsConfig.options.target === ScriptTarget.ES5 ? 'es5' : 'es2015',
+ isPlatformServer ? 'node' : 'web',
+ scriptTarget === ScriptTarget.ES5 ? 'es5' : 'es2015',
],
profile: buildOptions.statsJson,
resolve: {
@@ -330,22 +315,32 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise chunk.name === 'main',
+ enforce: true,
+ test: /[\\/]node_modules[\\/]/,
+ },
+ },
+ },
},
- plugins: [new DedupeModuleResolvePlugin({ verbose: buildOptions.verbose }), ...extraPlugins],
+ plugins: [new NamedChunksPlugin(), new DedupeModuleResolvePlugin({ verbose }), ...extraPlugins],
+ node: false,
};
}
-
-function getCacheSettings(
- wco: WebpackConfigOptions,
- supportedBrowsers: string[],
- angularVersion: string,
-): WebpackOptionsNormalized['cache'] {
- const { enabled, path: cacheDirectory } = wco.buildOptions.cache;
- if (enabled) {
- const packageVersion = require('../../../package.json').version;
-
- return {
- type: 'filesystem',
- cacheDirectory: path.join(cacheDirectory, 'angular-webpack'),
- maxMemoryGenerations: 1,
- // We use the versions and build options as the cache name. The Webpack configurations are too
- // dynamic and shared among different build types: test, build and serve.
- // None of which are "named".
- name: createHash('sha1')
- .update(angularVersion)
- .update(packageVersion)
- .update(wco.projectRoot)
- .update(JSON.stringify(wco.tsConfig))
- .update(
- JSON.stringify({
- ...wco.buildOptions,
- // Needed because outputPath changes on every build when using i18n extraction
- // https://github.com/angular/angular-cli/blob/736a5f89deaca85f487b78aec9ff66d4118ceb6a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts#L264-L265
- outputPath: undefined,
- }),
- )
- .update(supportedBrowsers.join(''))
- .digest('hex'),
- };
- }
-
- if (wco.buildOptions.watch) {
- return {
- type: 'memory',
- maxGenerations: 1,
- };
- }
-
- return false;
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts b/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts
index 8fb4bc195a51..956c83321333 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts
@@ -7,11 +7,11 @@
*/
import { logging, tags } from '@angular-devkit/core';
-import { existsSync } from 'fs';
-import { posix, resolve } from 'path';
-import * as url from 'url';
-import * as webpack from 'webpack';
-import { Configuration } from 'webpack-dev-server';
+import { existsSync, promises as fsPromises } from 'fs';
+import { extname, posix, resolve } from 'path';
+import { URL, pathToFileURL } from 'url';
+import { Configuration, RuleSetRule } from 'webpack';
+import { Configuration as DevServerConfiguration } from 'webpack-dev-server';
import { WebpackConfigOptions, WebpackDevServerOptions } from '../../utils/build-options';
import { loadEsmModule } from '../../utils/load-esm';
import { getIndexOutputFile } from '../../utils/webpack-browser-config';
@@ -19,7 +19,7 @@ import { HmrLoader } from '../plugins/hmr/hmr-loader';
export async function getDevServerConfig(
wco: WebpackConfigOptions,
-): Promise {
+): Promise {
const {
buildOptions: { host, port, index, headers, watch, hmr, main, liveReload, proxyConfig },
logger,
@@ -28,7 +28,7 @@ export async function getDevServerConfig(
const servePath = buildServePath(wco.buildOptions, logger);
- const extraRules: webpack.RuleSetRule[] = [];
+ const extraRules: RuleSetRule[] = [];
if (hmr) {
extraRules.push({
loader: HmrLoader,
@@ -72,7 +72,7 @@ export async function getDevServerConfig(
rewrites: [
{
from: new RegExp(`^(?!${servePath})/.*`),
- to: (context) => url.format(context.parsedUrl),
+ to: (context) => context.parsedUrl.href,
},
],
},
@@ -83,7 +83,7 @@ export async function getDevServerConfig(
},
compress: false,
static: false,
- https: getSslConfig(root, wco.buildOptions),
+ server: getServerConfig(root, wco.buildOptions),
allowedHosts: getAllowedHostsConfig(wco.buildOptions),
devMiddleware: {
publicPath: servePath,
@@ -139,16 +139,25 @@ export function buildServePath(
* Private method to enhance a webpack config with SSL configuration.
* @private
*/
-function getSslConfig(root: string, options: WebpackDevServerOptions): Configuration['https'] {
+function getServerConfig(
+ root: string,
+ options: WebpackDevServerOptions,
+): DevServerConfiguration['server'] {
const { ssl, sslCert, sslKey } = options;
- if (ssl && sslCert && sslKey) {
- return {
- key: resolve(root, sslKey),
- cert: resolve(root, sslCert),
- };
+ if (!ssl) {
+ return 'http';
}
- return ssl;
+ return {
+ type: 'https',
+ options:
+ sslCert && sslKey
+ ? {
+ key: resolve(root, sslKey),
+ cert: resolve(root, sslCert),
+ }
+ : undefined,
+ };
}
/**
@@ -161,22 +170,81 @@ async function addProxyConfig(root: string, proxyConfig: string | undefined) {
}
const proxyPath = resolve(root, proxyConfig);
- if (existsSync(proxyPath)) {
- try {
+
+ if (!existsSync(proxyPath)) {
+ throw new Error(`Proxy configuration file ${proxyPath} does not exist.`);
+ }
+
+ switch (extname(proxyPath)) {
+ case '.json': {
+ const content = await fsPromises.readFile(proxyPath, 'utf-8');
+
+ const { parse, printParseErrorCode } = await import('jsonc-parser');
+ const parseErrors: import('jsonc-parser').ParseError[] = [];
+ const proxyConfiguration = parse(content, parseErrors, { allowTrailingComma: true });
+
+ if (parseErrors.length > 0) {
+ let errorMessage = `Proxy configuration file ${proxyPath} contains parse errors:`;
+ for (const parseError of parseErrors) {
+ const { line, column } = getJsonErrorLineColumn(parseError.offset, content);
+ errorMessage += `\n[${line}, ${column}] ${printParseErrorCode(parseError.error)}`;
+ }
+ throw new Error(errorMessage);
+ }
+
+ return proxyConfiguration;
+ }
+ case '.mjs':
+ // Load the ESM configuration file using the TypeScript dynamic import workaround.
+ // Once TypeScript provides support for keeping the dynamic import this workaround can be
+ // changed to a direct dynamic import.
+ return (await loadEsmModule<{ default: unknown }>(pathToFileURL(proxyPath))).default;
+ case '.cjs':
return require(proxyPath);
- } catch (e) {
- if (e.code === 'ERR_REQUIRE_ESM') {
- // Load the ESM configuration file using the TypeScript dynamic import workaround.
- // Once TypeScript provides support for keeping the dynamic import this workaround can be
- // changed to a direct dynamic import.
- return (await loadEsmModule<{ default: unknown }>(url.pathToFileURL(proxyPath))).default;
+ default:
+ // The file could be either CommonJS or ESM.
+ // CommonJS is tried first then ESM if loading fails.
+ try {
+ return require(proxyPath);
+ } catch (e) {
+ if (e.code === 'ERR_REQUIRE_ESM') {
+ // Load the ESM configuration file using the TypeScript dynamic import workaround.
+ // Once TypeScript provides support for keeping the dynamic import this workaround can be
+ // changed to a direct dynamic import.
+ return (await loadEsmModule<{ default: unknown }>(pathToFileURL(proxyPath))).default;
+ }
+
+ throw e;
}
+ }
+}
+
+/**
+ * Calculates the line and column for an error offset in the content of a JSON file.
+ * @param location The offset error location from the beginning of the content.
+ * @param content The full content of the file containing the error.
+ * @returns An object containing the line and column
+ */
+function getJsonErrorLineColumn(offset: number, content: string) {
+ if (offset === 0) {
+ return { line: 1, column: 1 };
+ }
- throw e;
+ let line = 0;
+ let position = 0;
+ // eslint-disable-next-line no-constant-condition
+ while (true) {
+ ++line;
+
+ const nextNewline = content.indexOf('\n', position);
+ if (nextNewline === -1 || nextNewline > offset) {
+ break;
}
+
+ position = nextNewline + 1;
}
- throw new Error('Proxy config file ' + proxyPath + ' does not exist.');
+ return { line, column: offset - position + 1 };
}
/**
@@ -217,7 +285,9 @@ function findDefaultServePath(baseHref?: string, deployUrl?: string): string | n
return `${normalizedBaseHref}${deployUrl || ''}`;
}
-function getAllowedHostsConfig(options: WebpackDevServerOptions): Configuration['allowedHosts'] {
+function getAllowedHostsConfig(
+ options: WebpackDevServerOptions,
+): DevServerConfiguration['allowedHosts'] {
if (options.disableHostCheck) {
return 'all';
} else if (options.allowedHosts?.length) {
@@ -230,11 +300,8 @@ function getAllowedHostsConfig(options: WebpackDevServerOptions): Configuration[
function getPublicHostOptions(options: WebpackDevServerOptions, webSocketPath: string): string {
let publicHost: string | null | undefined = options.publicHost;
if (publicHost) {
- if (!/^\w+:\/\//.test(publicHost)) {
- publicHost = `https://${publicHost}`;
- }
-
- publicHost = url.parse(publicHost).host;
+ const hostWithProtocol = !/^\w+:\/\//.test(publicHost) ? `https://${publicHost}` : publicHost;
+ publicHost = new URL(hostWithProtocol).host;
}
return `auto://${publicHost || '0.0.0.0:0'}${webSocketPath}`;
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/index.ts b/packages/angular_devkit/build_angular/src/webpack/configs/index.ts
index 7bd7532ab545..14a1ba5e822b 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/index.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/configs/index.ts
@@ -7,12 +7,6 @@
*/
export * from './analytics';
-export * from './browser';
export * from './common';
export * from './dev-server';
-export * from './server';
export * from './styles';
-export * from './test';
-export * from './typescript';
-export * from './stats';
-export * from './worker';
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/server.ts b/packages/angular_devkit/build_angular/src/webpack/configs/server.ts
deleted file mode 100644
index 1a1bbd9f2bda..000000000000
--- a/packages/angular_devkit/build_angular/src/webpack/configs/server.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import { isAbsolute } from 'path';
-import { Configuration, ContextReplacementPlugin } from 'webpack';
-import { WebpackConfigOptions } from '../../utils/build-options';
-import { getSourceMapDevTool } from '../utils/helpers';
-
-/**
- * Returns a partial Webpack configuration specific to creating a bundle for node
- * @param wco Options which include the build options and app config
- */
-export function getServerConfig(wco: WebpackConfigOptions): Configuration {
- const { sourceMap, bundleDependencies, externalDependencies = [] } = wco.buildOptions;
-
- const extraPlugins = [];
- const { scripts, styles, hidden } = sourceMap;
- if (scripts || styles) {
- extraPlugins.push(getSourceMapDevTool(scripts, styles, hidden));
- }
-
- const externals: Configuration['externals'] = [...externalDependencies];
- if (!bundleDependencies) {
- externals.push(({ context, request }, callback) =>
- externalizePackages(context ?? wco.projectRoot, request, callback),
- );
- }
-
- return {
- resolve: {
- mainFields: ['es2020', 'es2015', 'main', 'module'],
- },
- output: {
- libraryTarget: 'commonjs',
- },
- module: {
- parser: {
- javascript: {
- worker: false,
- url: false,
- },
- },
- },
- plugins: [
- // Fixes Critical dependency: the request of a dependency is an expression
- new ContextReplacementPlugin(/@?hapi(\\|\/)/),
- new ContextReplacementPlugin(/express(\\|\/)/),
- ...extraPlugins,
- ],
- node: false,
- externals,
- };
-}
-
-function externalizePackages(
- context: string,
- request: string | undefined,
- callback: (error?: Error, result?: string) => void,
-): void {
- if (!request) {
- return;
- }
-
- // Absolute & Relative paths are not externals
- if (request.startsWith('.') || isAbsolute(request)) {
- callback();
-
- return;
- }
-
- try {
- require.resolve(request, { paths: [context] });
- callback(undefined, request);
- } catch {
- // Node couldn't find it, so it must be user-aliased
- callback();
- }
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts b/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts
deleted file mode 100644
index 0da435ed320d..000000000000
--- a/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import { WebpackConfigOptions } from '../../utils/build-options';
-
-const webpackOutputOptions = {
- all: false, // Fallback value for stats options when an option is not defined. It has precedence over local webpack defaults.
- colors: true,
- hash: true, // required by custom stat output
- timings: true, // required by custom stat output
- chunks: true, // required by custom stat output
- builtAt: true, // required by custom stat output
- warnings: true,
- errors: true,
- assets: true, // required by custom stat output
- cachedAssets: true, // required for bundle size calculators
-
- // Needed for markAsyncChunksNonInitial.
- ids: true,
- entrypoints: true,
-};
-
-const verboseWebpackOutputOptions: Record = {
- // The verbose output will most likely be piped to a file, so colors just mess it up.
- colors: false,
- usedExports: true,
- optimizationBailout: true,
- reasons: true,
- children: true,
- assets: true,
- version: true,
- chunkModules: true,
- errorDetails: true,
- moduleTrace: true,
- logging: 'verbose',
- modulesSpace: Infinity,
-};
-
-export function getWebpackStatsConfig(verbose = false) {
- return verbose
- ? { ...webpackOutputOptions, ...verboseWebpackOutputOptions }
- : webpackOutputOptions;
-}
-
-export function getStatsConfig(wco: WebpackConfigOptions) {
- const verbose = !!wco.buildOptions.verbose;
-
- return {
- stats: getWebpackStatsConfig(verbose),
- };
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/styles.ts b/packages/angular_devkit/build_angular/src/webpack/configs/styles.ts
index 533ec1305d62..5bbc08ff104f 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/styles.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/configs/styles.ts
@@ -8,10 +8,9 @@
import * as fs from 'fs';
import * as path from 'path';
-import * as webpack from 'webpack';
+import { Configuration, RuleSetUseItem } from 'webpack';
import { ExtraEntryPoint } from '../../builders/browser/schema';
import { SassWorkerImplementation } from '../../sass/sass-service';
-import { BuildBrowserFeatures } from '../../utils/build-browser-features';
import { WebpackConfigOptions } from '../../utils/build-options';
import {
AnyComponentStyleBudgetChecker,
@@ -71,13 +70,13 @@ function resolveGlobalStyles(
}
// eslint-disable-next-line max-lines-per-function
-export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuration {
+export function getStylesConfig(wco: WebpackConfigOptions): Configuration {
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const postcssImports = require('postcss-import');
const postcssPresetEnv: typeof import('postcss-preset-env') = require('postcss-preset-env');
const { root, buildOptions } = wco;
- const extraPlugins: { apply(compiler: webpack.Compiler): void }[] = [];
+ const extraPlugins: Configuration['plugins'] = [];
extraPlugins.push(new AnyComponentStyleBudgetChecker(buildOptions.budgets));
@@ -108,14 +107,16 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
);
}
- const sassImplementation = new SassWorkerImplementation();
- extraPlugins.push({
- apply(compiler) {
- compiler.hooks.shutdown.tap('sass-worker', () => {
- sassImplementation?.close();
- });
- },
- });
+ const sassImplementation = getSassImplementation();
+ if (sassImplementation instanceof SassWorkerImplementation) {
+ extraPlugins.push({
+ apply(compiler) {
+ compiler.hooks.shutdown.tap('sass-worker', () => {
+ sassImplementation?.close();
+ });
+ },
+ });
+ }
const assetNameTemplate = assetNameTemplateFactory(hashFormat);
@@ -155,9 +156,8 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
}
}
- const { supportedBrowsers } = new BuildBrowserFeatures(wco.projectRoot);
const postcssPresetEnvPlugin = postcssPresetEnv({
- browsers: supportedBrowsers,
+ browsers: buildOptions.supportedBrowsers,
autoprefixer: true,
stage: 3,
});
@@ -230,7 +230,7 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
const postCss = require('postcss');
const postCssLoaderPath = require.resolve('postcss-loader');
- const componentStyleLoaders: webpack.RuleSetUseItem[] = [
+ const componentStyleLoaders: RuleSetUseItem[] = [
{
loader: postCssLoaderPath,
options: {
@@ -240,7 +240,7 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
},
];
- const globalStyleLoaders: webpack.RuleSetUseItem[] = [
+ const globalStyleLoaders: RuleSetUseItem[] = [
{
loader: MiniCssExtractPlugin.loader,
},
@@ -263,7 +263,7 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
const styleLanguages: {
extensions: string[];
- use: webpack.RuleSetUseItem[];
+ use: RuleSetUseItem[];
}[] = [
{
extensions: ['css'],
@@ -379,14 +379,14 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
oneOf: [
// Component styles are all styles except defined global styles
{
- exclude: globalStylePaths,
use: componentStyleLoaders,
+ resourceQuery: /\?ngResource/,
type: 'asset/source',
},
// Global styles are only defined global styles
{
- include: globalStylePaths,
use: globalStyleLoaders,
+ resourceQuery: { not: [/\?ngResource/] },
},
],
},
@@ -398,7 +398,7 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
minimizer: buildOptions.optimization.styles.minify
? [
new CssOptimizerPlugin({
- supportedBrowsers,
+ supportedBrowsers: buildOptions.supportedBrowsers,
}),
]
: undefined,
@@ -406,3 +406,14 @@ export function getStylesConfig(wco: WebpackConfigOptions): webpack.Configuratio
plugins: extraPlugins,
};
}
+
+function getSassImplementation(): SassWorkerImplementation | typeof import('sass') {
+ const { webcontainer } = process.versions as unknown as Record;
+
+ // When `webcontainer` is a truthy it means that we are running in a StackBlitz webcontainer.
+ // `SassWorkerImplementation` uses `receiveMessageOnPort` Node.js `worker_thread` API to ensure sync behavior which is ~2x faster.
+ // However, it is non trivial to support this in a webcontainer and while slower we choose to use `dart-sass`
+ // which in Webpack uses the slower async path.
+ // We should periodically check with StackBlitz folks (Mark Whitfeld / Dominic Elm) to determine if this workaround is still needed.
+ return webcontainer ? require('sass') : new SassWorkerImplementation();
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/test.ts b/packages/angular_devkit/build_angular/src/webpack/configs/test.ts
deleted file mode 100644
index 9c8f1cf1c7a4..000000000000
--- a/packages/angular_devkit/build_angular/src/webpack/configs/test.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import * as glob from 'glob';
-import * as path from 'path';
-import { ScriptTarget } from 'typescript';
-import * as webpack from 'webpack';
-import { WebpackConfigOptions, WebpackTestOptions } from '../../utils/build-options';
-import { getSourceMapDevTool, isPolyfillsEntry } from '../utils/helpers';
-
-export function getTestConfig(
- wco: WebpackConfigOptions,
-): webpack.Configuration {
- const {
- buildOptions: { codeCoverage, codeCoverageExclude, main, sourceMap, webWorkerTsConfig },
- root,
- sourceRoot,
- } = wco;
-
- const extraRules: webpack.RuleSetRule[] = [];
- const extraPlugins: { apply(compiler: webpack.Compiler): void }[] = [];
-
- if (codeCoverage) {
- const exclude: (string | RegExp)[] = [/\.(e2e|spec)\.tsx?$/, /node_modules/];
-
- if (codeCoverageExclude) {
- for (const excludeGlob of codeCoverageExclude) {
- glob
- .sync(path.join(root, excludeGlob), { nodir: true })
- .forEach((file) => exclude.push(path.normalize(file)));
- }
- }
-
- extraRules.push({
- test: /\.[cm]?[tj]sx?$/,
- loader: require.resolve('@jsdevtools/coverage-istanbul-loader'),
- options: { esModules: true },
- enforce: 'post',
- exclude,
- include: sourceRoot,
- });
- }
-
- if (sourceMap.scripts || sourceMap.styles) {
- extraPlugins.push(getSourceMapDevTool(sourceMap.scripts, sourceMap.styles, false, true));
- }
-
- return {
- mode: 'development',
- target: wco.tsConfig.options.target === ScriptTarget.ES5 ? ['web', 'es5'] : 'web',
- resolve: {
- mainFields: ['es2020', 'es2015', 'browser', 'module', 'main'],
- conditionNames: ['es2020', 'es2015', '...'],
- },
- devtool: false,
- entry: {
- main: path.resolve(root, main),
- },
- module: {
- rules: extraRules,
- parser:
- webWorkerTsConfig === undefined
- ? {
- javascript: {
- worker: false,
- url: false,
- },
- }
- : undefined,
- },
- plugins: extraPlugins,
- optimization: {
- splitChunks: {
- chunks: (chunk) => !isPolyfillsEntry(chunk.name),
- cacheGroups: {
- vendors: false,
- defaultVendors: {
- name: 'vendor',
- chunks: (chunk) => chunk.name === 'main',
- enforce: true,
- test: /[\\/]node_modules[\\/]/,
- },
- },
- },
- },
- };
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/worker.ts b/packages/angular_devkit/build_angular/src/webpack/configs/worker.ts
deleted file mode 100644
index 5bcff25626e5..000000000000
--- a/packages/angular_devkit/build_angular/src/webpack/configs/worker.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-import { resolve } from 'path';
-import { Configuration } from 'webpack';
-import { WebpackConfigOptions } from '../../utils/build-options';
-import { getTypescriptWorkerPlugin } from './typescript';
-
-export function getWorkerConfig(wco: WebpackConfigOptions): Configuration {
- const { webWorkerTsConfig } = wco.buildOptions;
-
- if (!webWorkerTsConfig) {
- return {};
- }
-
- return {
- plugins: [getTypescriptWorkerPlugin(wco, resolve(wco.root, webWorkerTsConfig))],
- };
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/analytics.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/analytics.ts
index a430bbb5abad..d793455fc537 100644
--- a/packages/angular_devkit/build_angular/src/webpack/plugins/analytics.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/analytics.ts
@@ -81,7 +81,7 @@ export class NgBuildAnalyticsPlugin {
protected _projectRoot: string,
protected _analytics: analytics.Analytics,
protected _category: string,
- private _isIvy: boolean,
+ private aotEnabled: boolean,
) {}
protected _reset() {
@@ -115,7 +115,7 @@ export class NgBuildAnalyticsPlugin {
dimensions[analytics.NgCliAnalyticsDimensions.BuildErrors] = `,${this._stats.errors.join()},`;
}
- dimensions[analytics.NgCliAnalyticsDimensions.NgIvyEnabled] = this._isIvy;
+ dimensions[analytics.NgCliAnalyticsDimensions.AotEnabled] = this.aotEnabled;
return dimensions;
}
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts
index 782c1f88cf5a..ef0e5a7cd162 100644
--- a/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts
@@ -197,7 +197,6 @@ function restoreFormValues(oldInputs: any[], oldOptions: any[]): void {
case 'date':
case 'datetime-local':
case 'email':
- case 'file':
case 'hidden':
case 'month':
case 'number':
@@ -212,6 +211,10 @@ function restoreFormValues(oldInputs: any[], oldOptions: any[]): void {
case 'week':
newElement.value = oldElement.value;
break;
+ case 'file':
+ // Ignored due: Uncaught DOMException: Failed to set the 'value' property on 'HTMLInputElement':
+ // This input element accepts a filename, which may only be programmatically set to the empty string.
+ break;
default:
console.warn('[NG HMR] Unknown input type ' + oldElement.type + '.');
continue;
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/index.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/index.ts
index d9237fc07263..70b29f8529ff 100644
--- a/packages/angular_devkit/build_angular/src/webpack/plugins/index.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/index.ts
@@ -13,6 +13,8 @@ export { SuppressExtractedTextChunksWebpackPlugin } from './suppress-entry-chunk
export { RemoveHashPlugin, RemoveHashPluginOptions } from './remove-hash-plugin';
export { DedupeModuleResolvePlugin } from './dedupe-module-resolve-plugin';
export { CommonJsUsageWarnPlugin } from './common-js-usage-warn-plugin';
+export { JsonStatsPlugin } from './json-stats-plugin';
+export { JavaScriptOptimizerPlugin } from './javascript-optimizer-plugin';
export {
default as PostcssCliResources,
PostcssCliResourcesOptions,
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/json-stats-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/json-stats-plugin.ts
new file mode 100644
index 000000000000..d7594c0c806f
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/json-stats-plugin.ts
@@ -0,0 +1,39 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { createWriteStream, promises as fsPromises } from 'fs';
+import { dirname } from 'path';
+import { Compiler } from 'webpack';
+
+import { addError } from '../../utils/webpack-diagnostics';
+
+export class JsonStatsPlugin {
+ constructor(private readonly statsOutputPath: string) {}
+
+ apply(compiler: Compiler) {
+ compiler.hooks.done.tapPromise('angular-json-stats', async (stats) => {
+ const { stringifyStream } = await import('@discoveryjs/json-ext');
+ const data = stats.toJson('verbose');
+
+ try {
+ await fsPromises.mkdir(dirname(this.statsOutputPath), { recursive: true });
+ await new Promise((resolve, reject) =>
+ stringifyStream(data)
+ .pipe(createWriteStream(this.statsOutputPath))
+ .on('close', resolve)
+ .on('error', reject),
+ );
+ } catch (error) {
+ addError(
+ stats.compilation,
+ `Unable to write stats file: ${error.message || 'unknown error'}`,
+ );
+ }
+ });
+ }
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/karma/karma.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/karma/karma.ts
index 6df3d8fcf203..a3ef885b350a 100644
--- a/packages/angular_devkit/build_angular/src/webpack/plugins/karma/karma.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/karma/karma.ts
@@ -17,7 +17,7 @@ const webpackDevMiddleware = require('webpack-dev-middleware');
import { statsErrorsToString } from '../../utils/stats';
import { createConsoleLogger } from '@angular-devkit/core/node';
import { logging } from '@angular-devkit/core';
-import { WebpackTestOptions } from '../../../utils/build-options';
+import { BuildOptions } from '../../../utils/build-options';
import { normalizeSourceMaps } from '../../../utils/index';
const KARMA_APPLICATION_PATH = '_karma_webpack_';
@@ -58,7 +58,7 @@ const init: any = (config: any, emitter: any) => {
` be used from within Angular CLI and will not work correctly outside of it.`,
);
}
- const options = config.buildWebpack.options as WebpackTestOptions;
+ const options = config.buildWebpack.options as BuildOptions;
const logger: logging.Logger = config.buildWebpack.logger || createConsoleLogger();
successCb = config.buildWebpack.successCb;
failureCb = config.buildWebpack.failureCb;
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/named-chunks-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/named-chunks-plugin.ts
new file mode 100644
index 000000000000..feb0e5d208e4
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/named-chunks-plugin.ts
@@ -0,0 +1,53 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { AsyncDependenciesBlock, Chunk, Compiler, Template, dependencies } from 'webpack';
+
+// `ImportDependency` is not part of Webpack's depenencies typings.
+const ImportDependency: typeof dependencies.ModuleDependency = require('webpack/lib/dependencies/ImportDependency');
+
+const PLUGIN_NAME = 'named-chunks-plugin';
+
+/**
+ * Webpack will not populate the chunk `name` property unless `webpackChunkName` magic comment is used.
+ * This however will also effect the filename which is not desired when using `deterministic` chunkIds.
+ * This plugin will populate the chunk `name` which is mainly used so that users can set bundle budgets on lazy chunks.
+ */
+export class NamedChunksPlugin {
+ apply(compiler: Compiler) {
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
+ compilation.hooks.chunkAsset.tap(PLUGIN_NAME, (chunk) => {
+ if (chunk.name) {
+ return;
+ }
+
+ const name = this.generateName(chunk);
+ if (name) {
+ chunk.name = name;
+ }
+ });
+ });
+ }
+
+ private generateName(chunk: Chunk): string | undefined {
+ for (const group of chunk.groupsIterable) {
+ const [block] = group.getBlocks();
+ if (!(block instanceof AsyncDependenciesBlock)) {
+ continue;
+ }
+
+ for (const dependency of block.dependencies) {
+ if (dependency instanceof ImportDependency) {
+ return Template.toPath(dependency.request);
+ }
+ }
+ }
+
+ return undefined;
+ }
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/progress-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/progress-plugin.ts
new file mode 100644
index 000000000000..0c3c2f33d411
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/progress-plugin.ts
@@ -0,0 +1,38 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { ProgressPlugin as WebpackProgressPlugin } from 'webpack';
+import { Spinner } from '../../utils/spinner';
+
+export class ProgressPlugin extends WebpackProgressPlugin {
+ constructor(platform: 'server' | 'browser') {
+ const platformCapitalFirst = platform.replace(/^\w/, (s) => s.toUpperCase());
+ const spinner = new Spinner();
+ spinner.start(`Generating ${platform} application bundles (phase: setup)...`);
+
+ super({
+ handler: (percentage: number, message: string) => {
+ const phase = message ? ` (phase: ${message})` : '';
+ spinner.text = `Generating ${platform} application bundles${phase}...`;
+
+ switch (percentage) {
+ case 1:
+ if (spinner.isSpinning) {
+ spinner.succeed(`${platformCapitalFirst} application bundle generation complete.`);
+ }
+ break;
+ case 0:
+ if (!spinner.isSpinning) {
+ spinner.start();
+ }
+ break;
+ }
+ },
+ });
+ }
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/transfer-size-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/transfer-size-plugin.ts
new file mode 100644
index 000000000000..2d61b27d7634
--- /dev/null
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/transfer-size-plugin.ts
@@ -0,0 +1,61 @@
+/**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+import { promisify } from 'util';
+import { Compiler } from 'webpack';
+import { brotliCompress } from 'zlib';
+
+const brotliCompressAsync = promisify(brotliCompress);
+
+const PLUGIN_NAME = 'angular-transfer-size-estimator';
+
+export class TransferSizePlugin {
+ constructor() {}
+
+ apply(compiler: Compiler) {
+ compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
+ compilation.hooks.processAssets.tapPromise(
+ {
+ name: PLUGIN_NAME,
+ stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
+ },
+ async (compilationAssets) => {
+ const actions = [];
+ for (const assetName of Object.keys(compilationAssets)) {
+ if (!assetName.endsWith('.js') && !assetName.endsWith('.css')) {
+ continue;
+ }
+
+ const scriptAsset = compilation.getAsset(assetName);
+ if (!scriptAsset || scriptAsset.source.size() <= 0) {
+ continue;
+ }
+
+ actions.push(
+ brotliCompressAsync(scriptAsset.source.source())
+ .then((result) => {
+ compilation.updateAsset(assetName, (s) => s, {
+ estimatedTransferSize: result.length,
+ });
+ })
+ .catch((error) => {
+ compilation.warnings.push(
+ new compilation.compiler.webpack.WebpackError(
+ `Unable to calculate estimated transfer size for '${assetName}'. Reason: ${error.message}`,
+ ),
+ );
+ }),
+ );
+ }
+
+ await Promise.all(actions);
+ },
+ );
+ });
+ }
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/typescript.ts
similarity index 77%
rename from packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts
rename to packages/angular_devkit/build_angular/src/webpack/plugins/typescript.ts
index c97390e39af0..542293a5c94d 100644
--- a/packages/angular_devkit/build_angular/src/webpack/configs/typescript.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/plugins/typescript.ts
@@ -8,9 +8,8 @@
import { getSystemPath } from '@angular-devkit/core';
import type { CompilerOptions } from '@angular/compiler-cli';
-import { AngularWebpackLoaderPath, AngularWebpackPlugin } from '@ngtools/webpack';
+import { AngularWebpackPlugin } from '@ngtools/webpack';
import { ScriptTarget } from 'typescript';
-import { Configuration } from 'webpack';
import { WebpackConfigOptions } from '../../utils/build-options';
function ensureIvy(wco: WebpackConfigOptions): void {
@@ -28,11 +27,15 @@ function ensureIvy(wco: WebpackConfigOptions): void {
wco.tsConfig.options.enableIvy = true;
}
-function createIvyPlugin(
+export function createIvyPlugin(
wco: WebpackConfigOptions,
aot: boolean,
tsconfig: string,
): AngularWebpackPlugin {
+ if (aot) {
+ ensureIvy(wco);
+ }
+
const { buildOptions } = wco;
const optimize = buildOptions.optimization.scripts;
@@ -86,32 +89,3 @@ function createIvyPlugin(
inlineStyleFileExtension,
});
}
-
-export function getTypeScriptConfig(wco: WebpackConfigOptions): Configuration {
- const {
- buildOptions: { aot = false, main, polyfills },
- tsConfigPath,
- } = wco;
-
- if (main || polyfills) {
- ensureIvy(wco);
-
- return {
- module: {
- rules: [
- {
- test: /\.[jt]sx?$/,
- loader: AngularWebpackLoaderPath,
- },
- ],
- },
- plugins: [createIvyPlugin(wco, aot, tsConfigPath)],
- };
- }
-
- return {};
-}
-
-export function getTypescriptWorkerPlugin(wco: WebpackConfigOptions, workerTsConfigPath: string) {
- return createIvyPlugin(wco, false, workerTsConfigPath);
-}
diff --git a/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts b/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts
index 4c1f9c1529cf..de4a0dbd7606 100644
--- a/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts
@@ -6,9 +6,19 @@
* found in the LICENSE file at https://angular.io/license
*/
+import type { ObjectPattern } from 'copy-webpack-plugin';
+import { createHash } from 'crypto';
+import { existsSync } from 'fs';
+import glob from 'glob';
import * as path from 'path';
-import { Configuration, SourceMapDevToolPlugin } from 'webpack';
-import { ExtraEntryPoint, ExtraEntryPointClass } from '../../builders/browser/schema';
+import { ScriptTarget } from 'typescript';
+import type { Configuration, WebpackOptionsNormalized } from 'webpack';
+import {
+ AssetPatternClass,
+ ExtraEntryPoint,
+ ExtraEntryPointClass,
+} from '../../builders/browser/schema';
+import { WebpackConfigOptions } from '../../utils/build-options';
export interface HashFormat {
chunk: string;
@@ -64,47 +74,6 @@ export function normalizeExtraEntryPoints(
});
}
-export function getSourceMapDevTool(
- scriptsSourceMap: boolean | undefined,
- stylesSourceMap: boolean | undefined,
- hiddenSourceMap = false,
- inlineSourceMap = false,
-): SourceMapDevToolPlugin {
- const include = [];
- if (scriptsSourceMap) {
- include.push(/js$/);
- }
-
- if (stylesSourceMap) {
- include.push(/css$/);
- }
-
- return new SourceMapDevToolPlugin({
- filename: inlineSourceMap ? undefined : '[file].map',
- include,
- // We want to set sourceRoot to `webpack:///` for non
- // inline sourcemaps as otherwise paths to sourcemaps will be broken in browser
- // `webpack:///` is needed for Visual Studio breakpoints to work properly as currently
- // there is no way to set the 'webRoot'
- sourceRoot: 'webpack:///',
- moduleFilenameTemplate: '[resource-path]',
- append: hiddenSourceMap ? false : undefined,
- });
-}
-
-export function isPolyfillsEntry(name: string): boolean {
- return name === 'polyfills';
-}
-
-export function getWatchOptions(
- poll: number | undefined,
-): NonNullable {
- return {
- poll,
- ignored: poll === undefined ? '**/$_lazy_route_resources' : 'node_modules/**',
- };
-}
-
export function assetNameTemplateFactory(hashFormat: HashFormat): (resourcePath: string) => string {
const visitedFiles = new Map();
@@ -131,3 +100,222 @@ export function assetNameTemplateFactory(hashFormat: HashFormat): (resourcePath:
return '[path][name].[ext]';
};
}
+
+export function getInstrumentationExcludedPaths(
+ sourceRoot: string,
+ excludedPaths: string[],
+): Set {
+ const excluded = new Set();
+
+ for (const excludeGlob of excludedPaths) {
+ glob
+ .sync(path.join(sourceRoot, excludeGlob), { nodir: true })
+ .forEach((p) => excluded.add(path.normalize(p)));
+ }
+
+ return excluded;
+}
+
+export function getCacheSettings(
+ wco: WebpackConfigOptions,
+ angularVersion: string,
+): WebpackOptionsNormalized['cache'] {
+ const { enabled, path: cacheDirectory } = wco.buildOptions.cache;
+ if (enabled) {
+ const packageVersion = require('../../../package.json').version;
+
+ return {
+ type: 'filesystem',
+ cacheDirectory: path.join(cacheDirectory, 'angular-webpack'),
+ maxMemoryGenerations: 1,
+ // We use the versions and build options as the cache name. The Webpack configurations are too
+ // dynamic and shared among different build types: test, build and serve.
+ // None of which are "named".
+ name: createHash('sha1')
+ .update(angularVersion)
+ .update(packageVersion)
+ .update(wco.projectRoot)
+ .update(JSON.stringify(wco.tsConfig))
+ .update(
+ JSON.stringify({
+ ...wco.buildOptions,
+ // Needed because outputPath changes on every build when using i18n extraction
+ // https://github.com/angular/angular-cli/blob/736a5f89deaca85f487b78aec9ff66d4118ceb6a/packages/angular_devkit/build_angular/src/utils/i18n-options.ts#L264-L265
+ outputPath: undefined,
+ }),
+ )
+ .digest('hex'),
+ };
+ }
+
+ if (wco.buildOptions.watch) {
+ return {
+ type: 'memory',
+ maxGenerations: 1,
+ };
+ }
+
+ return false;
+}
+
+export function globalScriptsByBundleName(
+ root: string,
+ scripts: ExtraEntryPoint[],
+): { bundleName: string; inject: boolean; paths: string[] }[] {
+ return normalizeExtraEntryPoints(scripts, 'scripts').reduce(
+ (prev: { bundleName: string; paths: string[]; inject: boolean }[], curr) => {
+ const { bundleName, inject, input } = curr;
+ let resolvedPath = path.resolve(root, input);
+
+ if (!existsSync(resolvedPath)) {
+ try {
+ resolvedPath = require.resolve(input, { paths: [root] });
+ } catch {
+ throw new Error(`Script file ${input} does not exist.`);
+ }
+ }
+
+ const existingEntry = prev.find((el) => el.bundleName === bundleName);
+ if (existingEntry) {
+ if (existingEntry.inject && !inject) {
+ // All entries have to be lazy for the bundle to be lazy.
+ throw new Error(`The ${bundleName} bundle is mixing injected and non-injected scripts.`);
+ }
+
+ existingEntry.paths.push(resolvedPath);
+ } else {
+ prev.push({
+ bundleName,
+ inject,
+ paths: [resolvedPath],
+ });
+ }
+
+ return prev;
+ },
+ [],
+ );
+}
+
+export function assetPatterns(root: string, assets: AssetPatternClass[]) {
+ return assets.map((asset: AssetPatternClass, index: number): ObjectPattern => {
+ // Resolve input paths relative to workspace root and add slash at the end.
+ // eslint-disable-next-line prefer-const
+ let { input, output, ignore = [], glob } = asset;
+ input = path.resolve(root, input).replace(/\\/g, '/');
+ input = input.endsWith('/') ? input : input + '/';
+ output = output.endsWith('/') ? output : output + '/';
+
+ if (output.startsWith('..')) {
+ throw new Error('An asset cannot be written to a location outside of the output path.');
+ }
+
+ return {
+ context: input,
+ // Now we remove starting slash to make Webpack place it from the output root.
+ to: output.replace(/^\//, ''),
+ from: glob,
+ noErrorOnMissing: true,
+ force: true,
+ globOptions: {
+ dot: true,
+ followSymbolicLinks: !!asset.followSymlinks,
+ ignore: [
+ '.gitkeep',
+ '**/.DS_Store',
+ '**/Thumbs.db',
+ // Negate patterns needs to be absolute because copy-webpack-plugin uses absolute globs which
+ // causes negate patterns not to match.
+ // See: https://github.com/webpack-contrib/copy-webpack-plugin/issues/498#issuecomment-639327909
+ ...ignore,
+ ].map((i) => path.posix.join(input, i)),
+ },
+ priority: index,
+ };
+ });
+}
+
+export function externalizePackages(
+ context: string,
+ request: string | undefined,
+ callback: (error?: Error, result?: string) => void,
+): void {
+ if (!request) {
+ return;
+ }
+
+ // Absolute & Relative paths are not externals
+ if (request.startsWith('.') || path.isAbsolute(request)) {
+ callback();
+
+ return;
+ }
+
+ try {
+ require.resolve(request, { paths: [context] });
+ callback(undefined, request);
+ } catch {
+ // Node couldn't find it, so it must be user-aliased
+ callback();
+ }
+}
+
+type WebpackStatsOptions = Exclude;
+export function getStatsOptions(verbose = false): WebpackStatsOptions {
+ const webpackOutputOptions: WebpackStatsOptions = {
+ all: false, // Fallback value for stats options when an option is not defined. It has precedence over local webpack defaults.
+ colors: true,
+ hash: true, // required by custom stat output
+ timings: true, // required by custom stat output
+ chunks: true, // required by custom stat output
+ builtAt: true, // required by custom stat output
+ warnings: true,
+ errors: true,
+ assets: true, // required by custom stat output
+ cachedAssets: true, // required for bundle size calculators
+
+ // Needed for markAsyncChunksNonInitial.
+ ids: true,
+ entrypoints: true,
+ };
+
+ const verboseWebpackOutputOptions: WebpackStatsOptions = {
+ // The verbose output will most likely be piped to a file, so colors just mess it up.
+ colors: false,
+ usedExports: true,
+ optimizationBailout: true,
+ reasons: true,
+ children: true,
+ assets: true,
+ version: true,
+ chunkModules: true,
+ errorDetails: true,
+ moduleTrace: true,
+ logging: 'verbose',
+ modulesSpace: Infinity,
+ };
+
+ return verbose
+ ? { ...webpackOutputOptions, ...verboseWebpackOutputOptions }
+ : webpackOutputOptions;
+}
+
+export function getMainFieldsAndConditionNames(
+ target: ScriptTarget,
+ platformServer: boolean,
+): Pick {
+ const mainFields = platformServer
+ ? ['es2015', 'module', 'main']
+ : ['es2015', 'browser', 'module', 'main'];
+ const conditionNames = ['es2015', '...'];
+
+ if (target >= ScriptTarget.ES2020) {
+ mainFields.unshift('es2020');
+ conditionNames.unshift('es2020');
+ }
+
+ return {
+ mainFields,
+ conditionNames,
+ };
+}
diff --git a/packages/angular_devkit/build_angular/src/webpack/utils/stats.ts b/packages/angular_devkit/build_angular/src/webpack/utils/stats.ts
index 51e93a62be1c..b294cc5ee0d4 100644
--- a/packages/angular_devkit/build_angular/src/webpack/utils/stats.ts
+++ b/packages/angular_devkit/build_angular/src/webpack/utils/stats.ts
@@ -12,10 +12,10 @@ import * as path from 'path';
import textTable from 'text-table';
import { Configuration, StatsCompilation } from 'webpack';
import { Schema as BrowserBuilderOptions } from '../../builders/browser/schema';
+import { BudgetCalculatorResult } from '../../utils/bundle-calculator';
import { colors as ansiColors, removeColor } from '../../utils/color';
-import { getWebpackStatsConfig } from '../configs/stats';
import { markAsyncChunksNonInitial } from './async-chunks';
-import { normalizeExtraEntryPoints } from './helpers';
+import { getStatsOptions, normalizeExtraEntryPoints } from './helpers';
export function formatSize(size: number): string {
if (size <= 0) {
@@ -31,20 +31,28 @@ export function formatSize(size: number): string {
return `${roundedSize.toFixed(fractionDigits)} ${abbreviations[index]}`;
}
-export type BundleStatsData = [files: string, names: string, size: number | string];
+export type BundleStatsData = [
+ files: string,
+ names: string,
+ rawSize: number | string,
+ estimatedTransferSize: number | string,
+];
export interface BundleStats {
initial: boolean;
stats: BundleStatsData;
}
export function generateBundleStats(info: {
- size?: number;
+ rawSize?: number;
+ estimatedTransferSize?: number;
files?: string[];
names?: string[];
initial?: boolean;
rendered?: boolean;
}): BundleStats {
- const size = typeof info.size === 'number' ? info.size : '-';
+ const rawSize = typeof info.rawSize === 'number' ? info.rawSize : '-';
+ const estimatedTransferSize =
+ typeof info.estimatedTransferSize === 'number' ? info.estimatedTransferSize : '-';
const files =
info.files
?.filter((f) => !f.endsWith('.map'))
@@ -55,7 +63,7 @@ export function generateBundleStats(info: {
return {
initial,
- stats: [files, names, size],
+ stats: [files, names, rawSize, estimatedTransferSize],
};
}
@@ -63,30 +71,80 @@ function generateBuildStatsTable(
data: BundleStats[],
colors: boolean,
showTotalSize: boolean,
+ showEstimatedTransferSize: boolean,
+ budgetFailures?: BudgetCalculatorResult[],
): string {
const g = (x: string) => (colors ? ansiColors.greenBright(x) : x);
const c = (x: string) => (colors ? ansiColors.cyanBright(x) : x);
+ const r = (x: string) => (colors ? ansiColors.redBright(x) : x);
+ const y = (x: string) => (colors ? ansiColors.yellowBright(x) : x);
const bold = (x: string) => (colors ? ansiColors.bold(x) : x);
const dim = (x: string) => (colors ? ansiColors.dim(x) : x);
+ const getSizeColor = (name: string, file?: string, defaultColor = c) => {
+ const severity = budgets.get(name) || (file && budgets.get(file));
+ switch (severity) {
+ case 'warning':
+ return y;
+ case 'error':
+ return r;
+ default:
+ return defaultColor;
+ }
+ };
+
const changedEntryChunksStats: BundleStatsData[] = [];
const changedLazyChunksStats: BundleStatsData[] = [];
- let initialTotalSize = 0;
+ let initialTotalRawSize = 0;
+ let initialTotalEstimatedTransferSize;
- for (const { initial, stats } of data) {
- const [files, names, size] = stats;
+ const budgets = new Map();
+ if (budgetFailures) {
+ for (const { label, severity } of budgetFailures) {
+ // In some cases a file can have multiple budget failures.
+ // Favor error.
+ if (label && (!budgets.has(label) || budgets.get(label) === 'warning')) {
+ budgets.set(label, severity);
+ }
+ }
+ }
- const data: BundleStatsData = [
- g(files),
- names,
- c(typeof size === 'number' ? formatSize(size) : size),
- ];
+ for (const { initial, stats } of data) {
+ const [files, names, rawSize, estimatedTransferSize] = stats;
+ const getRawSizeColor = getSizeColor(names, files);
+ let data: BundleStatsData;
+
+ if (showEstimatedTransferSize) {
+ data = [
+ g(files),
+ names,
+ getRawSizeColor(typeof rawSize === 'number' ? formatSize(rawSize) : rawSize),
+ c(
+ typeof estimatedTransferSize === 'number'
+ ? formatSize(estimatedTransferSize)
+ : estimatedTransferSize,
+ ),
+ ];
+ } else {
+ data = [
+ g(files),
+ names,
+ getRawSizeColor(typeof rawSize === 'number' ? formatSize(rawSize) : rawSize),
+ '',
+ ];
+ }
if (initial) {
changedEntryChunksStats.push(data);
- if (typeof size === 'number') {
- initialTotalSize += size;
+ if (typeof rawSize === 'number') {
+ initialTotalRawSize += rawSize;
+ }
+ if (showEstimatedTransferSize && typeof estimatedTransferSize === 'number') {
+ if (initialTotalEstimatedTransferSize === undefined) {
+ initialTotalEstimatedTransferSize = 0;
+ }
+ initialTotalEstimatedTransferSize += estimatedTransferSize;
}
} else {
changedLazyChunksStats.push(data);
@@ -94,14 +152,35 @@ function generateBuildStatsTable(
}
const bundleInfo: (string | number)[][] = [];
+ const baseTitles = ['Names', 'Raw Size'];
+ const tableAlign: ('l' | 'r')[] = ['l', 'l', 'r'];
+
+ if (showEstimatedTransferSize) {
+ baseTitles.push('Estimated Transfer Size');
+ tableAlign.push('r');
+ }
// Entry chunks
if (changedEntryChunksStats.length) {
- bundleInfo.push(['Initial Chunk Files', 'Names', 'Size'].map(bold), ...changedEntryChunksStats);
+ bundleInfo.push(['Initial Chunk Files', ...baseTitles].map(bold), ...changedEntryChunksStats);
if (showTotalSize) {
bundleInfo.push([]);
- bundleInfo.push([' ', 'Initial Total', formatSize(initialTotalSize)].map(bold));
+
+ const initialSizeTotalColor = getSizeColor('bundle initial', undefined, (x) => x);
+ const totalSizeElements = [
+ ' ',
+ 'Initial Total',
+ initialSizeTotalColor(formatSize(initialTotalRawSize)),
+ ];
+ if (showEstimatedTransferSize) {
+ totalSizeElements.push(
+ typeof initialTotalEstimatedTransferSize === 'number'
+ ? formatSize(initialTotalEstimatedTransferSize)
+ : '-',
+ );
+ }
+ bundleInfo.push(totalSizeElements.map(bold));
}
}
@@ -112,13 +191,13 @@ function generateBuildStatsTable(
// Lazy chunks
if (changedLazyChunksStats.length) {
- bundleInfo.push(['Lazy Chunk Files', 'Names', 'Size'].map(bold), ...changedLazyChunksStats);
+ bundleInfo.push(['Lazy Chunk Files', ...baseTitles].map(bold), ...changedLazyChunksStats);
}
return textTable(bundleInfo, {
hsep: dim(' | '),
stringLength: (s) => removeColor(s).length,
- align: ['l', 'l', 'r'],
+ align: tableAlign,
});
}
@@ -138,7 +217,7 @@ function statsToString(
json: StatsCompilation,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
statsConfig: any,
- bundleState?: BundleStats[],
+ budgetFailures?: BudgetCalculatorResult[],
): string {
if (!json.chunks?.length) {
return '';
@@ -147,28 +226,44 @@ function statsToString(
const colors = statsConfig.colors;
const rs = (x: string) => (colors ? ansiColors.reset(x) : x);
- const changedChunksStats: BundleStats[] = bundleState ?? [];
+ const changedChunksStats: BundleStats[] = [];
let unchangedChunkNumber = 0;
- if (!bundleState?.length) {
- const isFirstRun = !runsCache.has(json.outputPath || '');
-
- for (const chunk of json.chunks) {
- // During first build we want to display unchanged chunks
- // but unchanged cached chunks are always marked as not rendered.
- if (!isFirstRun && !chunk.rendered) {
- continue;
- }
+ let hasEstimatedTransferSizes = false;
+
+ const isFirstRun = !runsCache.has(json.outputPath || '');
- const assets = json.assets?.filter((asset) => chunk.files?.includes(asset.name));
- const summedSize = assets
- ?.filter((asset) => !asset.name.endsWith('.map'))
- .reduce((total, asset) => total + asset.size, 0);
- changedChunksStats.push(generateBundleStats({ ...chunk, size: summedSize }));
+ for (const chunk of json.chunks) {
+ // During first build we want to display unchanged chunks
+ // but unchanged cached chunks are always marked as not rendered.
+ if (!isFirstRun && !chunk.rendered) {
+ continue;
}
- unchangedChunkNumber = json.chunks.length - changedChunksStats.length;
- runsCache.add(json.outputPath || '');
+ const assets = json.assets?.filter((asset) => chunk.files?.includes(asset.name));
+ let rawSize = 0;
+ let estimatedTransferSize;
+ if (assets) {
+ for (const asset of assets) {
+ if (asset.name.endsWith('.map')) {
+ continue;
+ }
+
+ rawSize += asset.size;
+
+ if (typeof asset.info.estimatedTransferSize === 'number') {
+ if (estimatedTransferSize === undefined) {
+ estimatedTransferSize = 0;
+ hasEstimatedTransferSizes = true;
+ }
+ estimatedTransferSize += asset.info.estimatedTransferSize;
+ }
+ }
+ }
+ changedChunksStats.push(generateBundleStats({ ...chunk, rawSize, estimatedTransferSize }));
}
+ unchangedChunkNumber = json.chunks.length - changedChunksStats.length;
+
+ runsCache.add(json.outputPath || '');
// Sort chunks by size in descending order
changedChunksStats.sort((a, b) => {
@@ -187,6 +282,8 @@ function statsToString(
changedChunksStats,
colors,
unchangedChunkNumber === 0,
+ hasEstimatedTransferSizes,
+ budgetFailures,
);
// In some cases we do things outside of webpack context
@@ -313,7 +410,7 @@ export function createWebpackLoggingCallback(
logger.info(stats.toString(config.stats));
}
- const rawStats = stats.toJson(getWebpackStatsConfig(false));
+ const rawStats = stats.toJson(getStatsOptions(false));
const webpackStats = {
...rawStats,
chunks: markAsyncChunksNonInitial(rawStats, extraEntryPoints),
@@ -327,9 +424,9 @@ export function webpackStatsLogger(
logger: logging.LoggerApi,
json: StatsCompilation,
config: Configuration,
- bundleStats?: BundleStats[],
+ budgetFailures?: BudgetCalculatorResult[],
): void {
- logger.info(statsToString(json, config.stats, bundleStats));
+ logger.info(statsToString(json, config.stats, budgetFailures));
if (statsHasWarnings(json)) {
logger.warn(statsWarningsToString(json, config.stats));
diff --git a/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts b/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts
index 385a12d1a665..97e03b7b47fb 100644
--- a/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts
+++ b/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts
@@ -16,4 +16,4 @@ if (environment.production) {
}
export { AppServerModule } from './app/app.server.module';
-export { renderModule, renderModuleFactory } from '@angular/platform-server';
+export { renderModule } from '@angular/platform-server';
diff --git a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/package.json b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/package.json
index 67aa57126998..cd184f7a620f 100644
--- a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/package.json
+++ b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/package.json
@@ -2,7 +2,7 @@
"name": "lib",
"version": "0.0.1",
"peerDependencies": {
- "@angular/common": "^12.0.0",
- "@angular/core": "^12.0.0"
+ "@angular/common": "^13.0.0",
+ "@angular/core": "^13.0.0"
}
}
\ No newline at end of file
diff --git a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/tsconfig.lib.json b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/tsconfig.lib.json
index 63dd9b693892..953df1b95597 100644
--- a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/tsconfig.lib.json
+++ b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/tsconfig.lib.json
@@ -1,15 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
- "target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
- "types": [],
- "lib": [
- "dom",
- "es2018"
- ]
+ "types": []
},
"exclude": [
"src/test.ts",
diff --git a/packages/angular_devkit/build_optimizer/package.json b/packages/angular_devkit/build_optimizer/package.json
index dd181e1851e1..807cad374ba8 100644
--- a/packages/angular_devkit/build_optimizer/package.json
+++ b/packages/angular_devkit/build_optimizer/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"source-map": "0.7.3",
"tslib": "2.3.1",
- "typescript": "4.4.3"
+ "typescript": "4.5.2"
},
"peerDependencies": {
"webpack": "^5.30.0"
@@ -22,6 +22,6 @@
}
},
"devDependencies": {
- "webpack": "5.57.1"
+ "webpack": "5.65.0"
}
}
diff --git a/packages/angular_devkit/build_webpack/package.json b/packages/angular_devkit/build_webpack/package.json
index 7a1ee3d29412..9fc65745fc0c 100644
--- a/packages/angular_devkit/build_webpack/package.json
+++ b/packages/angular_devkit/build_webpack/package.json
@@ -13,7 +13,7 @@
"devDependencies": {
"@angular-devkit/core": "0.0.0",
"node-fetch": "2.6.1",
- "webpack": "5.57.1"
+ "webpack": "5.65.0"
},
"peerDependencies": {
"webpack": "^5.30.0",
diff --git a/packages/angular_devkit/build_webpack/src/utils.ts b/packages/angular_devkit/build_webpack/src/utils.ts
index 61aa028b1fff..c788f5253b1e 100644
--- a/packages/angular_devkit/build_webpack/src/utils.ts
+++ b/packages/angular_devkit/build_webpack/src/utils.ts
@@ -7,7 +7,6 @@
*/
import * as path from 'path';
-import * as webpack from 'webpack';
export interface EmittedFiles {
id?: string;
@@ -18,16 +17,20 @@ export interface EmittedFiles {
extension: string;
}
-export function getEmittedFiles(compilation: webpack.Compilation): EmittedFiles[] {
+export function getEmittedFiles(compilation: import('webpack').Compilation): EmittedFiles[] {
const files: EmittedFiles[] = [];
+ const chunkFileNames = new Set();
// adds all chunks to the list of emitted files such as lazy loaded modules
- for (const chunk of compilation.chunks as Iterable) {
+ for (const chunk of compilation.chunks) {
for (const file of chunk.files) {
+ if (chunkFileNames.has(file)) {
+ continue;
+ }
+
+ chunkFileNames.add(file);
files.push({
- // The id is guaranteed to exist at this point in the compilation process
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- id: chunk.id!.toString(),
+ id: chunk.id?.toString(),
name: chunk.name,
file,
extension: path.extname(file),
@@ -36,14 +39,15 @@ export function getEmittedFiles(compilation: webpack.Compilation): EmittedFiles[
}
}
- // other all files
+ // add all other files
for (const file of Object.keys(compilation.assets)) {
+ // Chunk files have already been added to the files list above
+ if (chunkFileNames.has(file)) {
+ continue;
+ }
+
files.push({ file, extension: path.extname(file), initial: false, asset: true });
}
- // dedupe
- return files.filter(
- ({ file, name }, index) =>
- files.findIndex((f) => f.file === file && (!name || name === f.name)) === index,
- );
+ return files;
}
diff --git a/packages/angular_devkit/core/node/BUILD.bazel b/packages/angular_devkit/core/node/BUILD.bazel
index ed94cdc47f1a..a97bc10b2485 100644
--- a/packages/angular_devkit/core/node/BUILD.bazel
+++ b/packages/angular_devkit/core/node/BUILD.bazel
@@ -28,6 +28,7 @@ ts_library(
deps = [
"//packages/angular_devkit/core",
"@npm//@types/node",
+ "@npm//chokidar",
"@npm//rxjs",
],
)
diff --git a/packages/angular_devkit/core/node/host.ts b/packages/angular_devkit/core/node/host.ts
index 1a2b08ed7ff1..2b0aacb5b2f3 100644
--- a/packages/angular_devkit/core/node/host.ts
+++ b/packages/angular_devkit/core/node/host.ts
@@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
+import type { FSWatcher as ChokidarWatcher } from 'chokidar';
import fs, {
PathLike,
Stats,
@@ -20,7 +21,7 @@ import fs, {
unlinkSync,
writeFileSync,
} from 'fs';
-import { dirname as pathDirname, join as pathJoin } from 'path';
+import { dirname as pathDirname } from 'path';
import { Observable, concat, from as observableFrom, of, throwError } from 'rxjs';
import { concatMap, map, mergeMap, publish, refCount } from 'rxjs/operators';
import {
@@ -34,18 +35,6 @@ import {
virtualFs,
} from '../src';
-interface ChokidarWatcher {
- // eslint-disable-next-line @typescript-eslint/no-misused-new
- new (options: {}): ChokidarWatcher;
-
- add(path: string): ChokidarWatcher;
- on(type: 'change', cb: (path: string) => void): ChokidarWatcher;
- on(type: 'add', cb: (path: string) => void): ChokidarWatcher;
- on(type: 'unlink', cb: (path: string) => void): ChokidarWatcher;
-
- close(): void;
-}
-
async function exists(path: PathLike): Promise {
try {
await fsPromises.access(path, constants.F_OK);
@@ -59,7 +48,7 @@ async function exists(path: PathLike): Promise {
// This will only be initialized if the watch() method is called.
// Otherwise chokidar appears only in type positions, and shouldn't be referenced
// in the JavaScript output.
-let FSWatcher: ChokidarWatcher;
+let FSWatcher: typeof ChokidarWatcher;
function loadFSWatcher() {
if (!FSWatcher) {
try {
@@ -161,7 +150,8 @@ export class NodeJsAsyncHost implements virtualFs.Host {
): Observable | null {
return new Observable((obs) => {
loadFSWatcher();
- const watcher = new FSWatcher({ persistent: true }).add(getSystemPath(path));
+ const watcher = new FSWatcher({ persistent: true });
+ watcher.add(getSystemPath(path));
watcher
.on('change', (path) => {
@@ -308,9 +298,9 @@ export class NodeJsSyncHost implements virtualFs.Host {
_options?: virtualFs.HostWatchOptions,
): Observable | null {
return new Observable((obs) => {
- const opts = { persistent: false };
loadFSWatcher();
- const watcher = new FSWatcher(opts).add(getSystemPath(path));
+ const watcher = new FSWatcher({ persistent: false });
+ watcher.add(getSystemPath(path));
watcher
.on('change', (path) => {
diff --git a/packages/angular_devkit/core/package.json b/packages/angular_devkit/core/package.json
index 7cf203a38ad0..e75a03ffbaf3 100644
--- a/packages/angular_devkit/core/package.json
+++ b/packages/angular_devkit/core/package.json
@@ -9,12 +9,20 @@
],
"dependencies": {
"ajv-formats": "2.1.1",
- "ajv": "8.6.3",
+ "ajv": "8.8.2",
"fast-json-stable-stringify": "2.1.0",
"magic-string": "0.25.7",
"rxjs": "6.6.7",
"source-map": "0.7.3"
},
+ "peerDependencies": {
+ "chokidar": "^3.5.2"
+ },
+ "peerDependenciesMeta": {
+ "chokidar": {
+ "optional": true
+ }
+ },
"devDependencies": {
"seedrandom": "^3.0.0"
}
diff --git a/packages/angular_devkit/core/src/analytics/index.ts b/packages/angular_devkit/core/src/analytics/index.ts
index 38c996be3914..f99cef1b213a 100644
--- a/packages/angular_devkit/core/src/analytics/index.ts
+++ b/packages/angular_devkit/core/src/analytics/index.ts
@@ -27,7 +27,7 @@ export enum NgCliAnalyticsDimensions {
RamInGigabytes = 3,
NodeVersion = 4,
NgAddCollection = 6,
- NgIvyEnabled = 8,
+ AotEnabled = 8,
BuildErrors = 20,
}
@@ -57,7 +57,7 @@ export const NgCliAnalyticsDimensionsFlagInfo: { [name: string]: [string, string
RamInGigabytes: ['RAM (In GB)', 'number'],
NodeVersion: ['Node Version', 'number'],
NgAddCollection: ['--collection', 'string'],
- NgIvyEnabled: ['Ivy Enabled', 'boolean'],
+ AotEnabled: ['AOT Enabled', 'boolean'],
BuildErrors: ['Build Errors (comma separated)', 'string'],
};
diff --git a/packages/angular_devkit/core/src/utils/object.ts b/packages/angular_devkit/core/src/utils/object.ts
index 76af545985d2..2373953351b1 100644
--- a/packages/angular_devkit/core/src/utils/object.ts
+++ b/packages/angular_devkit/core/src/utils/object.ts
@@ -20,11 +20,9 @@ export function mapObject(
const copySymbol = Symbol();
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export function deepCopy(value: T): T {
+export function deepCopy(value: T): T {
if (Array.isArray(value)) {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- return (value.map((o: any) => deepCopy(o)) as unknown) as T;
+ return value.map((o) => deepCopy(o)) as unknown as T;
} else if (value && typeof value === 'object') {
const valueCasted = value as {
[copySymbol]?: T;
diff --git a/packages/angular_devkit/schematics/src/utility/update-buffer.ts b/packages/angular_devkit/schematics/src/utility/update-buffer.ts
index 67ceec7f5be2..6062e83d2e27 100644
--- a/packages/angular_devkit/schematics/src/utility/update-buffer.ts
+++ b/packages/angular_devkit/schematics/src/utility/update-buffer.ts
@@ -52,7 +52,7 @@ export class Chunk {
(this._right ? this._right.length : 0)
);
}
- toString(encoding = 'utf-8') {
+ toString(encoding: BufferEncoding = 'utf-8') {
return (
(this._left ? this._left.toString(encoding) : '') +
(this._content ? this._content.toString(encoding) : '') +
@@ -238,8 +238,15 @@ export class UpdateBuffer extends UpdateBufferBase {
}
protected _slice(start: number): [Chunk, Chunk] {
- // If start is longer than the content, use start, otherwise determine exact position in string.
- const index = start >= this._originalContent.length ? start : this._getTextPosition(start);
+ let index: number;
+
+ if (start >= this._originalContent.length) {
+ index = start;
+ } else if (start < 0) {
+ index = this._originalContent.length + start;
+ } else {
+ index = this._getTextPosition(start);
+ }
this._assertIndex(index);
@@ -272,7 +279,7 @@ export class UpdateBuffer extends UpdateBufferBase {
return this._originalContent;
}
- toString(encoding = 'utf-8'): string {
+ toString(encoding: BufferEncoding = 'utf-8'): string {
return this._linkedList.reduce((acc, chunk) => acc + chunk.toString(encoding), '');
}
generate(): Buffer {
@@ -294,8 +301,11 @@ export class UpdateBuffer extends UpdateBufferBase {
}
remove(index: number, length: number) {
- const end = index + length;
+ if (length === 0) {
+ return;
+ }
+ const end = index + length;
const first = this._slice(index)[1];
const last = this._slice(end)[1];
diff --git a/packages/angular_devkit/schematics/src/utility/update-buffer_spec.ts b/packages/angular_devkit/schematics/src/utility/update-buffer_spec.ts
index 93d46dde0fc3..c0b120bc363c 100644
--- a/packages/angular_devkit/schematics/src/utility/update-buffer_spec.ts
+++ b/packages/angular_devkit/schematics/src/utility/update-buffer_spec.ts
@@ -178,6 +178,26 @@ describe('UpdateBuffer', () => {
buffer.remove(0, 6);
expect(buffer.toString()).toBe('ABC');
});
+
+ it('is able to insert after a zero-length removal', () => {
+ const mb = new UpdateBuffer(Buffer.from('123'));
+
+ mb.remove(0, 0);
+ expect(mb.toString()).toBe('123');
+
+ mb.insertRight(0, Buffer.from('0'));
+ expect(mb.toString()).toBe('0123');
+ });
+
+ it('is able to insert after a negative-length removal', () => {
+ const mb = new UpdateBuffer(Buffer.from('123'));
+
+ mb.remove(0, -1);
+ expect(mb.toString()).toBe('3');
+
+ mb.insertRight(0, Buffer.from('0'));
+ expect(mb.toString()).toBe('03');
+ });
});
describe('generate', () => {
@@ -355,6 +375,26 @@ describe('UpdateBuffer2', () => {
buffer.remove(0, 6);
expect(buffer.toString()).toBe('ABCDEF');
});
+
+ it('is able to insert after a zero-length removal', () => {
+ const mb = new UpdateBuffer2(Buffer.from('123'));
+
+ mb.remove(0, 0);
+ expect(mb.toString()).toBe('123');
+
+ mb.insertRight(0, Buffer.from('0'));
+ expect(mb.toString()).toBe('0123');
+ });
+
+ it('is able to insert after a negative-length removal', () => {
+ const mb = new UpdateBuffer2(Buffer.from('123'));
+
+ mb.remove(0, -1);
+ expect(mb.toString()).toBe('3');
+
+ mb.insertRight(0, Buffer.from('0'));
+ expect(mb.toString()).toBe('03');
+ });
});
describe('generate', () => {
diff --git a/packages/angular_devkit/schematics_cli/BUILD.bazel b/packages/angular_devkit/schematics_cli/BUILD.bazel
index 1d2ccc908b91..43cc1cba03bc 100644
--- a/packages/angular_devkit/schematics_cli/BUILD.bazel
+++ b/packages/angular_devkit/schematics_cli/BUILD.bazel
@@ -1,6 +1,8 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
+load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
+load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
# Copyright Google Inc. All Rights Reserved.
#
@@ -88,3 +90,18 @@ ts_json_schema(
name = "schematic_schema",
src = "schematic/schema.json",
)
+
+pkg_npm(
+ name = "npm_package",
+ deps = [
+ ":schematics_cli",
+ ],
+)
+
+pkg_tar(
+ name = "npm_package_archive",
+ srcs = [":npm_package"],
+ extension = "tar.gz",
+ strip_prefix = "./npm_package",
+ tags = ["manual"],
+)
diff --git a/packages/angular_devkit/schematics_cli/blank/project-files/package.json b/packages/angular_devkit/schematics_cli/blank/project-files/package.json
index 6fc01d828bfc..b63f07bfdc10 100644
--- a/packages/angular_devkit/schematics_cli/blank/project-files/package.json
+++ b/packages/angular_devkit/schematics_cli/blank/project-files/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@angular-devkit/core": "^<%= coreVersion %>",
"@angular-devkit/schematics": "^<%= schematicsVersion %>",
- "typescript": "~4.4.3"
+ "typescript": "~4.5.2"
},
"devDependencies": {
"@types/node": "^12.11.1",
- "@types/jasmine": "~3.9.0",
+ "@types/jasmine": "~3.10.0",
"jasmine": "^3.5.0"
}
}
diff --git a/packages/angular_devkit/schematics_cli/schematic/files/package.json b/packages/angular_devkit/schematics_cli/schematic/files/package.json
index 2b7c8625c0b0..1c533118aadc 100644
--- a/packages/angular_devkit/schematics_cli/schematic/files/package.json
+++ b/packages/angular_devkit/schematics_cli/schematic/files/package.json
@@ -15,11 +15,11 @@
"dependencies": {
"@angular-devkit/core": "^<%= coreVersion %>",
"@angular-devkit/schematics": "^<%= schematicsVersion %>",
- "typescript": "~4.4.3"
+ "typescript": "~4.5.2"
},
"devDependencies": {
"@types/node": "^12.11.1",
- "@types/jasmine": "~3.9.0",
- "jasmine": "~3.9.0"
+ "@types/jasmine": "~3.10.0",
+ "jasmine": "~3.10.0"
}
}
diff --git a/packages/ngtools/webpack/README.md b/packages/ngtools/webpack/README.md
index db044e1d1646..c47fbfa15689 100644
--- a/packages/ngtools/webpack/README.md
+++ b/packages/ngtools/webpack/README.md
@@ -1,6 +1,9 @@
# Angular Compiler Webpack Plugin
Webpack 5.x plugin for the Angular Ahead-of-Time compiler. The plugin also supports Angular JIT mode.
+When this plugin is used outside of the Angular CLI, the Ivy linker will also be needed to support
+the usage of Angular libraries. An example configuration of the Babel-based Ivy linker is provided
+in the linker section. For additional information regarding the linker, please see: https://v13.angular.io/guide/creating-libraries#consuming-partial-ivy-code-outside-the-angular-cli
## Usage
@@ -13,6 +16,7 @@ exports = {
/* ... */
module: {
rules: [
+ /* ... */
{
test: /\.[jt]sx?$/,
loader: '@ngtools/webpack',
@@ -23,6 +27,7 @@ exports = {
plugins: [
new AngularWebpackPlugin({
tsconfig: 'path/to/tsconfig.json',
+ // ... other options as needed
}),
],
};
@@ -38,3 +43,38 @@ The loader works with webpack plugin to compile the application's TypeScript. It
- `directTemplateLoading` [default: `true`] - Causes the plugin to load component templates (HTML) directly from the filesystem. This is more efficient if only using the `raw-loader` to load component templates. Do not enable this option if additional loaders are configured for component templates.
- `fileReplacements` [default: none] - Allows replacing TypeScript files with other TypeScript files in the build. This option acts on fully resolved file paths.
- `inlineStyleFileExtension` [default: none] - When set inline component styles will be processed by Webpack as files with the provided extension.
+
+## Ivy Linker
+
+The Ivy linker can be setup by using the Webpack `babel-loader` package.
+If not already installed, add the `babel-loader` package using your project's package manager.
+Then in your webpack config, add the `babel-loader` with the following configuration.
+If the `babel-loader` is already present in your configuration, the linker plugin can be added to
+the existing loader configuration as well.
+Enabling caching for the `babel-loader` is recommended to avoid reprocessing libraries on
+every build.
+For additional information regarding the `babel-loader` package, please see: https://github.com/babel/babel-loader/tree/main#readme
+
+```typescript
+import linkerPlugin from '@angular/compiler-cli/linker/babel';
+
+exports = {
+ /* ... */
+ module: {
+ rules: [
+ /* ... */
+ {
+ test: /\.[cm]?js$/,
+ use: {
+ loader: 'babel-loader',
+ options: {
+ cacheDirectory: true,
+ compact: false,
+ plugins: [linkerPlugin],
+ },
+ },
+ },
+ ],
+ },
+};
+```
diff --git a/packages/ngtools/webpack/package.json b/packages/ngtools/webpack/package.json
index 4ecfb94485ee..e75fd310680c 100644
--- a/packages/ngtools/webpack/package.json
+++ b/packages/ngtools/webpack/package.json
@@ -22,15 +22,15 @@
"homepage": "https://github.com/angular/angular-cli/tree/master/packages/@ngtools/webpack",
"dependencies": {},
"peerDependencies": {
- "@angular/compiler-cli": "^13.0.0 || ^13.0.0-next",
- "typescript": "~4.4.3",
+ "@angular/compiler-cli": "^13.0.0 || ^13.1.0-next",
+ "typescript": ">=4.4.3 <4.6",
"webpack": "^5.30.0"
},
"devDependencies": {
"@angular-devkit/core": "0.0.0",
- "@angular/compiler": "13.0.0-next.13",
- "@angular/compiler-cli": "13.0.0-next.13",
- "typescript": "4.4.3",
- "webpack": "5.57.1"
+ "@angular/compiler": "13.1.0-next.3",
+ "@angular/compiler-cli": "13.1.0-next.3",
+ "typescript": "4.5.2",
+ "webpack": "5.65.0"
}
}
diff --git a/packages/ngtools/webpack/src/ivy/loader.ts b/packages/ngtools/webpack/src/ivy/loader.ts
index 682b87d651b7..583ee02fa83e 100644
--- a/packages/ngtools/webpack/src/ivy/loader.ts
+++ b/packages/ngtools/webpack/src/ivy/loader.ts
@@ -10,6 +10,8 @@ import * as path from 'path';
import type { LoaderContext } from 'webpack';
import { AngularPluginSymbol, FileEmitterCollection } from './symbol';
+const JS_FILE_REGEXP = /\.[cm]?js$/;
+
export function angularWebpackLoader(this: LoaderContext, content: string, map: string) {
const callback = this.async();
if (!callback) {
@@ -20,7 +22,7 @@ export function angularWebpackLoader(this: LoaderContext, content: stri
this as LoaderContext & { [AngularPluginSymbol]?: FileEmitterCollection }
)[AngularPluginSymbol];
if (!fileEmitter || typeof fileEmitter !== 'object') {
- if (this.resourcePath.endsWith('.js')) {
+ if (JS_FILE_REGEXP.test(this.resourcePath)) {
// Passthrough for JS files when no plugin is used
this.callback(undefined, content, map);
@@ -36,7 +38,7 @@ export function angularWebpackLoader(this: LoaderContext, content: stri
.emit(this.resourcePath)
.then((result) => {
if (!result) {
- if (this.resourcePath.endsWith('.js')) {
+ if (JS_FILE_REGEXP.test(this.resourcePath)) {
// Return original content for JS files if not compiled by TypeScript ("allowJs")
this.callback(undefined, content, map);
} else {
@@ -65,7 +67,9 @@ export function angularWebpackLoader(this: LoaderContext, content: stri
callback(undefined, resultContent, resultMap);
})
.catch((err) => {
- callback(err);
+ // The below is needed to hide stacktraces from users.
+ const message = err instanceof Error ? err.message : err;
+ callback(new Error(message));
});
}
diff --git a/packages/ngtools/webpack/src/ivy/plugin.ts b/packages/ngtools/webpack/src/ivy/plugin.ts
index ad3ab58722be..ae771f3817ee 100644
--- a/packages/ngtools/webpack/src/ivy/plugin.ts
+++ b/packages/ngtools/webpack/src/ivy/plugin.ts
@@ -553,74 +553,77 @@ export class AngularWebpackPlugin {
// Required to support asynchronous resource loading
// Must be done before creating transformers or getting template diagnostics
- const pendingAnalysis = angularCompiler.analyzeAsync().then(() => {
- this.requiredFilesToEmit.clear();
+ const pendingAnalysis = angularCompiler
+ .analyzeAsync()
+ .then(() => {
+ this.requiredFilesToEmit.clear();
- for (const sourceFile of builder.getSourceFiles()) {
- if (sourceFile.isDeclarationFile) {
- continue;
- }
+ for (const sourceFile of builder.getSourceFiles()) {
+ if (sourceFile.isDeclarationFile) {
+ continue;
+ }
- // Collect sources that are required to be emitted
- if (
- !ignoreForEmit.has(sourceFile) &&
- !angularCompiler.incrementalDriver.safeToSkipEmit(sourceFile)
- ) {
- this.requiredFilesToEmit.add(normalizePath(sourceFile.fileName));
+ // Collect sources that are required to be emitted
+ if (
+ !ignoreForEmit.has(sourceFile) &&
+ !angularCompiler.incrementalDriver.safeToSkipEmit(sourceFile)
+ ) {
+ this.requiredFilesToEmit.add(normalizePath(sourceFile.fileName));
- // If required to emit, diagnostics may have also changed
- if (!ignoreForDiagnostics.has(sourceFile)) {
- affectedFiles.add(sourceFile);
- }
- } else if (
- this.sourceFileCache &&
- !affectedFiles.has(sourceFile) &&
- !ignoreForDiagnostics.has(sourceFile)
- ) {
- // Use cached Angular diagnostics for unchanged and unaffected files
- const angularDiagnostics = this.sourceFileCache.getAngularDiagnostics(sourceFile);
- if (angularDiagnostics) {
- diagnosticsReporter(angularDiagnostics);
+ // If required to emit, diagnostics may have also changed
+ if (!ignoreForDiagnostics.has(sourceFile)) {
+ affectedFiles.add(sourceFile);
+ }
+ } else if (
+ this.sourceFileCache &&
+ !affectedFiles.has(sourceFile) &&
+ !ignoreForDiagnostics.has(sourceFile)
+ ) {
+ // Use cached Angular diagnostics for unchanged and unaffected files
+ const angularDiagnostics = this.sourceFileCache.getAngularDiagnostics(sourceFile);
+ if (angularDiagnostics) {
+ diagnosticsReporter(angularDiagnostics);
+ }
}
}
- }
- // Temporary workaround during transition to ESM-only @angular/compiler-cli
- // TODO_ESM: This workaround should be removed prior to the final release of v13
- // and replaced with only `this.compilerCli.OptimizeFor`.
- const OptimizeFor =
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (this.compilerCli as any).OptimizeFor ??
- require('@angular/compiler-cli/src/ngtsc/typecheck/api').OptimizeFor;
-
- // Collect new Angular diagnostics for files affected by changes
- const optimizeDiagnosticsFor =
- affectedFiles.size <= DIAGNOSTICS_AFFECTED_THRESHOLD
- ? OptimizeFor.SingleFile
- : OptimizeFor.WholeProgram;
- for (const affectedFile of affectedFiles) {
- const angularDiagnostics = angularCompiler.getDiagnosticsForFile(
- affectedFile,
- optimizeDiagnosticsFor,
- );
- diagnosticsReporter(angularDiagnostics);
- this.sourceFileCache?.updateAngularDiagnostics(affectedFile, angularDiagnostics);
- }
+ // Collect new Angular diagnostics for files affected by changes
+ const OptimizeFor = this.compilerCli.OptimizeFor;
+ const optimizeDiagnosticsFor =
+ affectedFiles.size <= DIAGNOSTICS_AFFECTED_THRESHOLD
+ ? OptimizeFor.SingleFile
+ : OptimizeFor.WholeProgram;
+ for (const affectedFile of affectedFiles) {
+ const angularDiagnostics = angularCompiler.getDiagnosticsForFile(
+ affectedFile,
+ optimizeDiagnosticsFor,
+ );
+ diagnosticsReporter(angularDiagnostics);
+ this.sourceFileCache?.updateAngularDiagnostics(affectedFile, angularDiagnostics);
+ }
+
+ return {
+ emitter: this.createFileEmitter(
+ builder,
+ mergeTransformers(angularCompiler.prepareEmit().transformers, transformers),
+ getDependencies,
+ (sourceFile) => {
+ this.requiredFilesToEmit.delete(normalizePath(sourceFile.fileName));
+ angularCompiler.incrementalDriver.recordSuccessfulEmit(sourceFile);
+ },
+ ),
+ };
+ })
+ .catch((err) => ({ errorMessage: err instanceof Error ? err.message : `${err}` }));
- return this.createFileEmitter(
- builder,
- mergeTransformers(angularCompiler.prepareEmit().transformers, transformers),
- getDependencies,
- (sourceFile) => {
- this.requiredFilesToEmit.delete(normalizePath(sourceFile.fileName));
- angularCompiler.incrementalDriver.recordSuccessfulEmit(sourceFile);
- },
- );
- });
const analyzingFileEmitter: FileEmitter = async (file) => {
- const innerFileEmitter = await pendingAnalysis;
+ const analysis = await pendingAnalysis;
- return innerFileEmitter(file);
+ if ('errorMessage' in analysis) {
+ throw new Error(analysis.errorMessage);
+ }
+
+ return analysis.emitter(file);
};
return {
@@ -731,24 +734,7 @@ export class AngularWebpackPlugin {
// this, a Function constructor is used to prevent TypeScript from changing the dynamic import.
// Once TypeScript provides support for keeping the dynamic import this workaround can
// be dropped.
- const compilerCliModule = await new Function(`return import('@angular/compiler-cli');`)();
- let compilerNgccModule;
- try {
- compilerNgccModule = await new Function(`return import('@angular/compiler-cli/ngcc');`)();
- } catch {
- // If the `exports` field entry is not present then try the file directly.
- // TODO_ESM: This try/catch can be removed once the `exports` field is present in `@angular/compiler-cli`
- compilerNgccModule = await new Function(
- `return import('@angular/compiler-cli/ngcc/index.js');`,
- )();
- }
- // If it is not ESM then the functions needed will be stored in the `default` property.
- // TODO_ESM: This conditional can be removed when `@angular/compiler-cli` is ESM only.
- this.compilerCliModule = compilerCliModule.readConfiguration
- ? compilerCliModule
- : compilerCliModule.default;
- this.compilerNgccModule = compilerNgccModule.process
- ? compilerNgccModule
- : compilerNgccModule.default;
+ this.compilerCliModule = await new Function(`return import('@angular/compiler-cli');`)();
+ this.compilerNgccModule = await new Function(`return import('@angular/compiler-cli/ngcc');`)();
}
}
diff --git a/packages/ngtools/webpack/src/ivy/transformation.ts b/packages/ngtools/webpack/src/ivy/transformation.ts
index 5240956306d7..927afd7b58c6 100644
--- a/packages/ngtools/webpack/src/ivy/transformation.ts
+++ b/packages/ngtools/webpack/src/ivy/transformation.ts
@@ -37,7 +37,6 @@ export function createJitTransformers(
builder: ts.BuilderProgram,
compilerCli: typeof import('@angular/compiler-cli'),
options: {
- directTemplateLoading?: boolean;
inlineStyleFileExtension?: string;
},
): ts.CustomTransformers {
@@ -45,12 +44,7 @@ export function createJitTransformers(
return {
before: [
- replaceResources(
- () => true,
- getTypeChecker,
- options.directTemplateLoading,
- options.inlineStyleFileExtension,
- ),
+ replaceResources(() => true, getTypeChecker, options.inlineStyleFileExtension),
compilerCli.constructorParametersDownlevelTransform(builder.getProgram()),
],
};
diff --git a/packages/ngtools/webpack/src/loaders/direct-resource.ts b/packages/ngtools/webpack/src/loaders/direct-resource.ts
deleted file mode 100644
index b6f2a2cae111..000000000000
--- a/packages/ngtools/webpack/src/loaders/direct-resource.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * @license
- * Copyright Google LLC All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
-
-export const DirectAngularResourceLoaderPath = __filename;
-
-export default function (content: string) {
- return `export default ${JSON.stringify(content)};`;
-}
diff --git a/packages/ngtools/webpack/src/ngcc_processor.ts b/packages/ngtools/webpack/src/ngcc_processor.ts
index 9c299ced47b3..5c9a9a79453b 100644
--- a/packages/ngtools/webpack/src/ngcc_processor.ts
+++ b/packages/ngtools/webpack/src/ngcc_processor.ts
@@ -120,14 +120,6 @@ export class NgccProcessor {
const timeLabel = 'NgccProcessor.process';
time(timeLabel);
- // Temporary workaround during transition to ESM-only @angular/compiler-cli
- // TODO_ESM: This workaround should be removed prior to the final release of v13
- // and replaced with only `this.compilerNgcc.ngccMainFilePath`.
- const ngccExecutablePath =
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (this.compilerNgcc as any).ngccMainFilePath ??
- require.resolve('@angular/compiler-cli/ngcc/main-ngcc.js');
-
// We spawn instead of using the API because:
// - NGCC Async uses clustering which is problematic when used via the API which means
// that we cannot setup multiple cluster masters with different options.
@@ -136,7 +128,7 @@ export class NgccProcessor {
const { status, error } = spawnSync(
process.execPath,
[
- ngccExecutablePath,
+ this.compilerNgcc.ngccMainFilePath,
'--source' /** basePath */,
this._nodeModulesDirectory,
'--properties' /** propertiesToConsider */,
diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts
index 9be817676e8a..128ea1ca46d6 100644
--- a/packages/ngtools/webpack/src/resource_loader.ts
+++ b/packages/ngtools/webpack/src/resource_loader.ts
@@ -16,6 +16,7 @@ import {
InlineAngularResourceLoaderPath,
InlineAngularResourceSymbol,
} from './loaders/inline-resource';
+import { NG_COMPONENT_RESOURCE_QUERY } from './transformers/replace_resources';
interface CompilationOutput {
content: string;
@@ -110,17 +111,24 @@ export class WebpackResourceLoader {
throw new Error('WebpackResourceLoader cannot be used without parentCompilation');
}
- // Create a special URL for reading the resource from memory
- const entry =
- filePath ||
- (resourceType
- ? `${containingFile}-${this.outputPathCounter}.${fileExtension}!=!${this.inlineDataLoaderPath}!${containingFile}`
- : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- `angular-resource:${resourceType},${createHash('md5').update(data!).digest('hex')}`);
+ const getEntry = (): string => {
+ if (filePath) {
+ return `${filePath}?${NG_COMPONENT_RESOURCE_QUERY}`;
+ } else if (resourceType) {
+ return (
+ // app.component.ts-2.css?ngResource!=!@ngtools/webpack/src/loaders/inline-resource.js!app.component.ts
+ `${containingFile}-${this.outputPathCounter}.${fileExtension}` +
+ `?${NG_COMPONENT_RESOURCE_QUERY}!=!${this.inlineDataLoaderPath}!${containingFile}`
+ );
+ } else if (data) {
+ // Create a special URL for reading the resource from memory
+ return `angular-resource:${resourceType},${createHash('md5').update(data).digest('hex')}`;
+ }
- if (!entry) {
- throw new Error(`"filePath" or "data" must be specified.`);
- }
+ throw new Error(`"filePath", "resourceType" or "data" must be specified.`);
+ };
+
+ const entry = getEntry();
// Simple sanity check.
if (filePath?.match(/\.[jt]s$/)) {
@@ -204,8 +212,11 @@ export class WebpackResourceLoader {
() => {
finalContent = childCompilation.assets[outputFilePath]?.source().toString();
- delete childCompilation.assets[outputFilePath];
- delete childCompilation.assets[outputFilePath + '.map'];
+ for (const { files } of childCompilation.chunks) {
+ for (const file of files) {
+ childCompilation.deleteAsset(file);
+ }
+ }
},
);
});
diff --git a/packages/ngtools/webpack/src/transformers/replace_resources.ts b/packages/ngtools/webpack/src/transformers/replace_resources.ts
index 9eba2512148b..36ddef728a43 100644
--- a/packages/ngtools/webpack/src/transformers/replace_resources.ts
+++ b/packages/ngtools/webpack/src/transformers/replace_resources.ts
@@ -7,13 +7,13 @@
*/
import * as ts from 'typescript';
-import { DirectAngularResourceLoaderPath } from '../loaders/direct-resource';
import { InlineAngularResourceLoaderPath } from '../loaders/inline-resource';
+export const NG_COMPONENT_RESOURCE_QUERY = 'ngResource';
+
export function replaceResources(
shouldTransform: (fileName: string) => boolean,
getTypeChecker: () => ts.TypeChecker,
- directTemplateLoading = false,
inlineStyleFileExtension?: string,
): ts.TransformerFactory {
return (context: ts.TransformationContext) => {
@@ -30,7 +30,6 @@ export function replaceResources(
nodeFactory,
node,
typeChecker,
- directTemplateLoading,
resourceImportDeclarations,
moduleKind,
inlineStyleFileExtension,
@@ -81,7 +80,6 @@ function visitDecorator(
nodeFactory: ts.NodeFactory,
node: ts.Decorator,
typeChecker: ts.TypeChecker,
- directTemplateLoading: boolean,
resourceImportDeclarations: ts.ImportDeclaration[],
moduleKind?: ts.ModuleKind,
inlineStyleFileExtension?: string,
@@ -111,7 +109,6 @@ function visitDecorator(
nodeFactory,
node,
styleReplacements,
- directTemplateLoading,
resourceImportDeclarations,
moduleKind,
inlineStyleFileExtension,
@@ -144,9 +141,8 @@ function visitComponentMetadata(
nodeFactory: ts.NodeFactory,
node: ts.ObjectLiteralElementLike,
styleReplacements: ts.Expression[],
- directTemplateLoading: boolean,
resourceImportDeclarations: ts.ImportDeclaration[],
- moduleKind?: ts.ModuleKind,
+ moduleKind: ts.ModuleKind = ts.ModuleKind.ES2015,
inlineStyleFileExtension?: string,
): ts.ObjectLiteralElementLike | undefined {
if (!ts.isPropertyAssignment(node) || ts.isComputedPropertyName(node.name)) {
@@ -159,10 +155,7 @@ function visitComponentMetadata(
return undefined;
case 'templateUrl':
- const url = getResourceUrl(
- node.initializer,
- directTemplateLoading ? `!${DirectAngularResourceLoaderPath}!` : '',
- );
+ const url = getResourceUrl(node.initializer);
if (!url) {
return node;
}
@@ -199,9 +192,12 @@ function visitComponentMetadata(
if (inlineStyleFileExtension) {
const data = Buffer.from(node.text).toString('base64');
const containingFile = node.getSourceFile().fileName;
- url = `${containingFile}.${inlineStyleFileExtension}!=!${InlineAngularResourceLoaderPath}?data=${encodeURIComponent(
- data,
- )}!${containingFile}`;
+ // app.component.ts.css?ngResource!=!@ngtools/webpack/src/loaders/inline-resource.js?data=...!app.component.ts
+ url =
+ `${containingFile}.${inlineStyleFileExtension}?${NG_COMPONENT_RESOURCE_QUERY}` +
+ `!=!${InlineAngularResourceLoaderPath}?data=${encodeURIComponent(
+ data,
+ )}!${containingFile}`;
} else {
return nodeFactory.createStringLiteral(node.text);
}
@@ -229,13 +225,13 @@ function visitComponentMetadata(
}
}
-export function getResourceUrl(node: ts.Node, loader = ''): string | null {
+export function getResourceUrl(node: ts.Node): string | null {
// only analyze strings
if (!ts.isStringLiteral(node) && !ts.isNoSubstitutionTemplateLiteral(node)) {
return null;
}
- return `${loader}${/^\.?\.\//.test(node.text) ? '' : './'}${node.text}`;
+ return `${/^\.?\.\//.test(node.text) ? '' : './'}${node.text}?${NG_COMPONENT_RESOURCE_QUERY}`;
}
function isComponentDecorator(node: ts.Node, typeChecker: ts.TypeChecker): node is ts.Decorator {
@@ -255,14 +251,15 @@ function createResourceImport(
nodeFactory: ts.NodeFactory,
url: string,
resourceImportDeclarations: ts.ImportDeclaration[],
- moduleKind = ts.ModuleKind.ES2015,
+ moduleKind: ts.ModuleKind,
): ts.Identifier | ts.Expression {
const urlLiteral = nodeFactory.createStringLiteral(url);
if (moduleKind < ts.ModuleKind.ES2015) {
- return nodeFactory.createPropertyAccessExpression(
- nodeFactory.createCallExpression(nodeFactory.createIdentifier('require'), [], [urlLiteral]),
- 'default',
+ return nodeFactory.createCallExpression(
+ nodeFactory.createIdentifier('require'),
+ [],
+ [urlLiteral],
);
} else {
const importName = nodeFactory.createIdentifier(
diff --git a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts
index 59d554c6748b..8647f60957a9 100644
--- a/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts
+++ b/packages/ngtools/webpack/src/transformers/replace_resources_spec.ts
@@ -8,14 +8,12 @@
import { tags } from '@angular-devkit/core';
import * as ts from 'typescript';
-import { DirectAngularResourceLoaderPath } from '../loaders/direct-resource';
import { replaceResources } from './replace_resources';
import { createTypescriptContext, transformTypescript } from './spec_helpers';
function transform(
input: string,
shouldTransform = true,
- directTemplateLoading = true,
importHelpers = true,
module: ts.ModuleKind = ts.ModuleKind.ES2020,
) {
@@ -24,11 +22,7 @@ function transform(
module,
});
const getTypeChecker = () => program.getTypeChecker();
- const transformer = replaceResources(
- () => shouldTransform,
- getTypeChecker,
- directTemplateLoading,
- );
+ const transformer = replaceResources(() => shouldTransform, getTypeChecker);
return transformTypescript(input, [transformer], program, compilerHost);
}
@@ -51,9 +45,9 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
- import __NG_CLI_RESOURCE__2 from "./app.component.2.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
+ import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
import { Component } from '@angular/core';
let AppComponent = class AppComponent {
@@ -102,53 +96,12 @@ describe('@ngtools/webpack transformers', () => {
AppComponent = (0, tslib_1.__decorate)([
(0, core_1.Component)({
selector: 'app-root',
- template: require("!${DirectAngularResourceLoaderPath}!./app.component.html").default,
- styles: [require("./app.component.css").default, require("./app.component.2.css").default] }) ], AppComponent);
+ template: require("./app.component.html?ngResource"),
+ styles: [require("./app.component.css?ngResource"), require("./app.component.2.css?ngResource")] }) ], AppComponent);
exports.AppComponent = AppComponent;
`;
- const result = transform(input, true, true, true, ts.ModuleKind.CommonJS);
- expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`);
- });
-
- it('should not replace resources when directTemplateLoading is false', () => {
- const input = tags.stripIndent`
- import { Component } from '@angular/core';
-
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: [
- './app.component.css',
- './app.component.2.css'
- ]
- })
- export class AppComponent {
- title = 'app';
- }
- `;
- const output = tags.stripIndent`
- import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
- import __NG_CLI_RESOURCE__2 from "./app.component.2.css";
- import { Component } from '@angular/core';
- let AppComponent = class AppComponent {
- constructor() {
- this.title = 'app';
- }
- };
- AppComponent = __decorate([
- Component({
- selector: 'app-root',
- template: __NG_CLI_RESOURCE__0,
- styles: [__NG_CLI_RESOURCE__1, __NG_CLI_RESOURCE__2]
- })
- ], AppComponent);
- export { AppComponent };
- `;
-
- const result = transform(input, true, false);
+ const result = transform(input, true, true, ts.ModuleKind.CommonJS);
expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`);
});
@@ -166,7 +119,7 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.svg";
+ import __NG_CLI_RESOURCE__0 from "./app.component.svg?ngResource";
import { Component } from '@angular/core';
let AppComponent = class AppComponent {
constructor() {
@@ -202,8 +155,8 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
import { Component } from '@angular/core';
let AppComponent = class AppComponent {
@@ -240,9 +193,9 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = `
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
- import __NG_CLI_RESOURCE__2 from "./app.component.2.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
+ import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
import { Component } from '@angular/core';
let AppComponent = class AppComponent {
@@ -279,9 +232,9 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
- import __NG_CLI_RESOURCE__2 from "./app.component.2.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
+ import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
import { Component as NgComponent } from '@angular/core';
let AppComponent = class AppComponent {
@@ -301,7 +254,7 @@ describe('@ngtools/webpack transformers', () => {
const { program } = createTypescriptContext(input);
const getTypeChecker = () => program.getTypeChecker();
- const transformer = replaceResources(() => true, getTypeChecker, true);
+ const transformer = replaceResources(() => true, getTypeChecker);
const result = transformTypescript(input, [transformer]);
expect(tags.oneLine`${result}`).toEqual(tags.oneLine`${output}`);
@@ -322,9 +275,9 @@ describe('@ngtools/webpack transformers', () => {
`;
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
- import __NG_CLI_RESOURCE__2 from "./app.component.2.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
+ import __NG_CLI_RESOURCE__2 from "./app.component.2.css?ngResource";
import * as ng from '@angular/core';
let AppComponent = class AppComponent {
@@ -367,8 +320,8 @@ describe('@ngtools/webpack transformers', () => {
const output = tags.stripIndent`
import { __decorate } from "tslib";
- import __NG_CLI_RESOURCE__0 from "!${DirectAngularResourceLoaderPath}!./app.component.html";
- import __NG_CLI_RESOURCE__1 from "./app.component.css";
+ import __NG_CLI_RESOURCE__0 from "./app.component.html?ngResource";
+ import __NG_CLI_RESOURCE__1 from "./app.component.css?ngResource";
import { Component } from '@angular/core';
diff --git a/packages/schematics/angular/BUILD.bazel b/packages/schematics/angular/BUILD.bazel
index b08c3791d3da..5ba6dd8eefe6 100644
--- a/packages/schematics/angular/BUILD.bazel
+++ b/packages/schematics/angular/BUILD.bazel
@@ -83,7 +83,6 @@ ts_library(
"//packages/angular_devkit/schematics/tasks",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript",
"@npm//@types/browserslist",
- "@npm//@types/caniuse-lite",
"@npm//@types/node",
"@npm//jsonc-parser",
"@npm//rxjs",
@@ -121,7 +120,6 @@ ts_library(
"//packages/angular_devkit/schematics/testing",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript",
"@npm//@types/browserslist",
- "@npm//@types/caniuse-lite",
"@npm//jsonc-parser",
"@npm//rxjs",
],
diff --git a/packages/schematics/angular/application/files/karma.conf.js.template b/packages/schematics/angular/application/files/karma.conf.js.template
index ecfc22f61514..3cf2cece8d82 100644
--- a/packages/schematics/angular/application/files/karma.conf.js.template
+++ b/packages/schematics/angular/application/files/karma.conf.js.template
@@ -25,7 +25,7 @@ module.exports = function (config) {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
- dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= appName%>'),
+ dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= folderName%>'),
subdir: '.',
reporters: [
{ type: 'html' },
diff --git a/packages/schematics/angular/application/files/src/test.ts.template b/packages/schematics/angular/application/files/src/test.ts.template
index 598d11e862e6..00025daf1720 100644
--- a/packages/schematics/angular/application/files/src/test.ts.template
+++ b/packages/schematics/angular/application/files/src/test.ts.template
@@ -9,8 +9,8 @@ import {
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
- keys(): string[];
(id: string): T;
+ keys(): string[];
};
};
diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts
index d8ef8d477412..151d10518cca 100644
--- a/packages/schematics/angular/application/index.ts
+++ b/packages/schematics/angular/application/index.ts
@@ -11,7 +11,6 @@ import {
MergeStrategy,
Rule,
SchematicContext,
- SchematicsException,
Tree,
apply,
applyTemplates,
@@ -28,7 +27,6 @@ import { Schema as ComponentOptions } from '../component/schema';
import { NodeDependencyType, addPackageJsonDependency } from '../utility/dependencies';
import { latestVersions } from '../utility/latest-versions';
import { relativePathToWorkspaceRoot } from '../utility/paths';
-import { validateProjectName } from '../utility/validation';
import { getWorkspace, updateWorkspace } from '../utility/workspace';
import { Builders, ProjectType } from '../utility/workspace-models';
import { Schema as ApplicationOptions, Style } from './schema';
@@ -61,7 +59,11 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
};
}
-function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rule {
+function addAppToWorkspaceFile(
+ options: ApplicationOptions,
+ appDir: string,
+ folderName: string,
+): Rule {
let projectRoot = appDir;
if (projectRoot) {
projectRoot += '/';
@@ -151,7 +153,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, appDir: string): Rul
builder: Builders.Browser,
defaultConfiguration: 'production',
options: {
- outputPath: `dist/${options.name}`,
+ outputPath: `dist/${folderName}`,
index: `${sourceRoot}/index.html`,
main: `${sourceRoot}/main.ts`,
polyfills: `${sourceRoot}/polyfills.ts`,
@@ -238,12 +240,6 @@ function minimalPathFilter(path: string): boolean {
export default function (options: ApplicationOptions): Rule {
return async (host: Tree) => {
- if (!options.name) {
- throw new SchematicsException(`Invalid options, "name" is required.`);
- }
-
- validateProjectName(options.name);
-
const appRootSelector = `${options.prefix}-root`;
const componentOptions: Partial = !options.minimal
? {
@@ -264,13 +260,20 @@ export default function (options: ApplicationOptions): Rule {
const workspace = await getWorkspace(host);
const newProjectRoot = (workspace.extensions.newProjectRoot as string | undefined) || '';
const isRootApp = options.projectRoot !== undefined;
+
+ // If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
+ let folderName = options.name.startsWith('@') ? options.name.substr(1) : options.name;
+ if (/[A-Z]/.test(folderName)) {
+ folderName = strings.dasherize(folderName);
+ }
+
const appDir = isRootApp
? normalize(options.projectRoot || '')
- : join(normalize(newProjectRoot), strings.dasherize(options.name));
+ : join(normalize(newProjectRoot), folderName);
const sourceDir = `${appDir}/src/app`;
return chain([
- addAppToWorkspaceFile(options, appDir),
+ addAppToWorkspaceFile(options, appDir, folderName),
mergeWith(
apply(url('https://redirect.github.com/files'), [
options.minimal ? filter(minimalPathFilter) : noop(),
@@ -280,6 +283,7 @@ export default function (options: ApplicationOptions): Rule {
relativePathToWorkspaceRoot: relativePathToWorkspaceRoot(appDir),
appName: options.name,
isRootApp,
+ folderName,
}),
move(appDir),
]),
diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts
index 21614be2a83c..a372512bb262 100644
--- a/packages/schematics/angular/application/index_spec.ts
+++ b/packages/schematics/angular/application/index_spec.ts
@@ -534,6 +534,15 @@ describe('Application Schematic', () => {
expect(exists).toBeTrue();
});
+ it(`should create scoped kebab-case project folder names with camelCase project name`, async () => {
+ const options: ApplicationOptions = { ...defaultOptions, name: '@foo/myCool' };
+ const tree = await schematicRunner
+ .runSchematicAsync('application', options, workspaceTree)
+ .toPromise();
+ const exists = tree.exists('/projects/foo/my-cool/.browserslistrc');
+ expect(exists).toBeTrue();
+ });
+
it(`should create kebab-case project folder names with PascalCase project name`, async () => {
const options: ApplicationOptions = { ...defaultOptions, name: 'MyCool' };
const tree = await schematicRunner
@@ -542,4 +551,39 @@ describe('Application Schematic', () => {
const exists = tree.exists('/projects/my-cool/.browserslistrc');
expect(exists).toBeTrue();
});
+
+ it(`should create scoped kebab-case project folder names with PascalCase project name`, async () => {
+ const options: ApplicationOptions = { ...defaultOptions, name: '@foo/MyCool' };
+ const tree = await schematicRunner
+ .runSchematicAsync('application', options, workspaceTree)
+ .toPromise();
+ const exists = tree.exists('/projects/foo/my-cool/.browserslistrc');
+ expect(exists).toBeTrue();
+ });
+
+ it('should support creating applications with `_` and `.` in name', async () => {
+ const options = { ...defaultOptions, name: 'foo.bar_buz' };
+ const tree = await schematicRunner
+ .runSchematicAsync('application', options, workspaceTree)
+ .toPromise();
+
+ const exists = tree.exists('/projects/foo.bar_buz/.browserslistrc');
+ expect(exists).toBeTrue();
+ });
+
+ it('should support creating scoped application', async () => {
+ const scopedName = '@myscope/myapp';
+ const options = { ...defaultOptions, name: scopedName };
+ const tree = await schematicRunner
+ .runSchematicAsync('application', options, workspaceTree)
+ .toPromise();
+
+ const cfg = JSON.parse(tree.readContent('/angular.json'));
+ expect(cfg.projects['@myscope/myapp']).toBeDefined();
+
+ const karmaConf = getFileContent(tree, '/projects/myscope/myapp/karma.conf.js');
+ expect(karmaConf).toContain(
+ `dir: require('path').join(__dirname, '../../../coverage/myscope/myapp')`,
+ );
+ });
});
diff --git a/packages/schematics/angular/application/other-files/app.component.html.template b/packages/schematics/angular/application/other-files/app.component.html.template
index 5efae6bc8c46..a9a45e0db39d 100644
--- a/packages/schematics/angular/application/other-files/app.component.html.template
+++ b/packages/schematics/angular/application/other-files/app.component.html.template
@@ -366,6 +366,12 @@
+
+
+ Angular Material
+
+
+
Angular Blog
@@ -430,29 +436,6 @@
-
-
-
-
-
-
-
-