Skip to content

Commit 423353c

Browse files
committed
build: replace lodash.template with lodash v4.17.21
The separate `lodash.template` package appears to no longer be updated. To address https://github.com/angular/angular-cli/security/dependabot/87 the package has been switch to `lodash` which is the main package and was updated to address the linked issue. This package is used within the build infrastructure tooling for the repository.
1 parent 682b02e commit 423353c

File tree

4 files changed

+8
-38
lines changed

4 files changed

+8
-38
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"@types/less": "^3.0.3",
9898
"@types/license-checker": "^25.0.6",
9999
"@types/loader-utils": "^2.0.0",
100-
"@types/lodash.template": "^4.5.3",
100+
"@types/lodash": "^4.17.0",
101101
"@types/node": "^18.13.0",
102102
"@types/npm-package-arg": "^6.1.0",
103103
"@types/pacote": "^11.1.3",
@@ -160,7 +160,7 @@
160160
"license-checker": "^25.0.0",
161161
"license-webpack-plugin": "4.0.2",
162162
"loader-utils": "3.2.1",
163-
"lodash.template": "^4.5.0",
163+
"lodash": "^4.17.21",
164164
"magic-string": "0.30.10",
165165
"mini-css-extract-plugin": "2.9.0",
166166
"mrmime": "2.0.0",

scripts/templates.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import template from 'lodash.template';
9+
import lodash from 'lodash';
1010
import * as fs from 'node:fs';
1111
import * as path from 'node:path';
1212
import { fileURLToPath } from 'node:url';
@@ -26,7 +26,7 @@ async function _runTemplate(inputPath: string, outputPath: string) {
2626
)();
2727

2828
const monorepo = JSON.parse(fs.readFileSync('./.monorepo.json', 'utf-8'));
29-
const content = template(fs.readFileSync(inputPath, 'utf-8'))({
29+
const content = lodash.template(fs.readFileSync(inputPath, 'utf-8'))({
3030
monorepo,
3131
packages: releasePackages.map(({ name }) => name),
3232
encode: (x: string) => global.encodeURIComponent(x),

scripts/validate-user-analytics.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import assert from 'assert';
1010
import glob from 'fast-glob';
1111
import * as fs from 'fs';
12-
import template from 'lodash.template';
12+
import lodash from 'lodash';
1313
import * as path from 'path';
1414
import { fileURLToPath } from 'url';
1515
import {
@@ -19,7 +19,7 @@ import {
1919
} from '../packages/angular/cli/src/analytics/analytics-parameters.mjs';
2020

2121
const __dirname = path.dirname(fileURLToPath(import.meta.url));
22-
const userAnalyticsTable = template(
22+
const userAnalyticsTable = lodash.template(
2323
fs.readFileSync(path.join(__dirname, './templates/user-analytics-table.ejs'), 'utf-8'),
2424
);
2525

yarn.lock

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
tslib "^2.3.0"
5252

5353
"@angular/bazel@https://github.com/angular/bazel-builds.git#948ff82ae1a3a606eb3df5f2d9ac86dde5a13774":
54-
version "18.1.0-next.0+sha-a0ec2d8"
55-
uid "948ff82ae1a3a606eb3df5f2d9ac86dde5a13774"
54+
version "18.1.0-next.0"
5655
resolved "https://github.com/angular/bazel-builds.git#948ff82ae1a3a606eb3df5f2d9ac86dde5a13774"
5756
dependencies:
5857
"@microsoft/api-extractor" "^7.24.2"
@@ -69,7 +68,6 @@
6968

7069
"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#051f8ea32487ea8b40cb84f49fba160926ca7399":
7170
version "0.0.0-8a3082e3b16d9800b6248bf8fe43c516cf473f89"
72-
uid "051f8ea32487ea8b40cb84f49fba160926ca7399"
7371
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#051f8ea32487ea8b40cb84f49fba160926ca7399"
7472
dependencies:
7573
"@angular/benchpress" "0.3.0"
@@ -268,7 +266,6 @@
268266

269267
"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#89546042315de3826640ce06503c92eddb5b3585":
270268
version "0.0.0-8a3082e3b16d9800b6248bf8fe43c516cf473f89"
271-
uid "89546042315de3826640ce06503c92eddb5b3585"
272269
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#89546042315de3826640ce06503c92eddb5b3585"
273270
dependencies:
274271
"@yarnpkg/lockfile" "^1.1.0"
@@ -3588,14 +3585,7 @@
35883585
"@types/node" "*"
35893586
"@types/webpack" "^4"
35903587

3591-
"@types/lodash.template@^4.5.3":
3592-
version "4.5.3"
3593-
resolved "https://registry.yarnpkg.com/@types/lodash.template/-/lodash.template-4.5.3.tgz#1174483eaa761a76a9d68c4adbee4c4e2742f329"
3594-
integrity sha512-Mo0UYKLu1oXgkV9TVoXZLlXXjyIXlW7ZQRxi/4gQJmzJr63dmicE8gG0OkPjYTKBrBic852q0JzqrtNUWLBIyA==
3595-
dependencies:
3596-
"@types/lodash" "*"
3597-
3598-
"@types/lodash@*", "@types/lodash@^4.14.175":
3588+
"@types/lodash@^4.14.175", "@types/lodash@^4.17.0":
35993589
version "4.17.0"
36003590
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3"
36013591
integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==
@@ -9248,11 +9238,6 @@ lodash-es@^4.17.21:
92489238
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
92499239
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
92509240

9251-
lodash._reinterpolate@^3.0.0:
9252-
version "3.0.0"
9253-
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
9254-
integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==
9255-
92569241
lodash.assignwith@^4.2.0:
92579242
version "4.2.0"
92589243
resolved "https://registry.yarnpkg.com/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb"
@@ -9323,21 +9308,6 @@ lodash.once@^4.0.0:
93239308
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
93249309
integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==
93259310

9326-
lodash.template@^4.5.0:
9327-
version "4.5.0"
9328-
resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
9329-
integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==
9330-
dependencies:
9331-
lodash._reinterpolate "^3.0.0"
9332-
lodash.templatesettings "^4.0.0"
9333-
9334-
lodash.templatesettings@^4.0.0:
9335-
version "4.2.0"
9336-
resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33"
9337-
integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==
9338-
dependencies:
9339-
lodash._reinterpolate "^3.0.0"
9340-
93419311
lodash@4, lodash@4.17.21, lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.21, lodash@~4.17.15:
93429312
version "4.17.21"
93439313
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"

0 commit comments

Comments
 (0)