source: trip-planner-front/node_modules/@schematics/angular/utility/latest-versions.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.latestVersions = void 0;
11/** Retrieve the minor version for the provided version string. */
12function getAngularEarliestMinorVersion(version) {
13 const versionMatching = version.match(/^(\d+)\.(\d+)\.\d+(-\w+)?/);
14 if (versionMatching === null) {
15 throw Error('Unable to determine the minor version for the provided version');
16 }
17 const [_, major, minor, prerelease = ''] = versionMatching;
18 return `~${major}.${minor}.0${prerelease}`;
19}
20exports.latestVersions = {
21 // We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe,
22 // but ts_library doesn't support JSON inputs.
23 ...require('./latest-versions/package.json')['dependencies'],
24 // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
25 Angular: getAngularEarliestMinorVersion(require('../package.json')['version']),
26 // Since @angular-devkit/build-angular and @schematics/angular are always
27 // published together from the same monorepo, and they are both
28 // non-experimental, they will always have the same version.
29 DevkitBuildAngular: '~' + require('../package.json')['version'],
30};
Note: See TracBrowser for help on using the repository browser.