Skip to content

Commit 173823d

Browse files
alan-agius4dgp1130
authored andcommitted
build: remove dependency on font-awesome
This dependency is only used to valid that node packages are resolved correctly. With this change we mock the structure of font-awesome to avoid having to install it.
1 parent 091ff40 commit 173823d

File tree

5 files changed

+22
-13
lines changed

5 files changed

+22
-13
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@
148148
"eslint-plugin-header": "3.1.1",
149149
"eslint-plugin-import": "2.26.0",
150150
"express": "4.18.1",
151-
"font-awesome": "^4.7.0",
152151
"glob": "8.0.3",
153152
"http-proxy": "^1.18.1",
154153
"https-proxy-agent": "5.0.1",

packages/angular_devkit/build_angular/BUILD.bazel

-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ LARGE_SPECS = {
341341
"@npm//@angular/animations",
342342
"@npm//@angular/material",
343343
"@npm//bootstrap",
344-
"@npm//font-awesome",
345344
"@npm//jquery",
346345
"@npm//popper.js",
347346
],

packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts

+14
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import { Architect } from '@angular-devkit/architect';
10+
import { TestProjectHost } from '@angular-devkit/architect/testing';
1011
import { normalize, tags } from '@angular-devkit/core';
1112
import { dirname } from 'path';
1213
import { browserBuild, createArchitect, host } from '../../../testing/test-utils';
@@ -259,7 +260,19 @@ describe('Browser Builder styles', () => {
259260
});
260261
});
261262

263+
/**
264+
* font-awesome mock to avoid having an extra dependency.
265+
*/
266+
function mockFontAwesomePackage(host: TestProjectHost): void {
267+
host.writeMultipleFiles({
268+
'node_modules/font-awesome/scss/font-awesome.scss': `
269+
* { color: red }
270+
`,
271+
});
272+
}
273+
262274
it(`supports font-awesome imports`, async () => {
275+
mockFontAwesomePackage(host);
263276
host.writeMultipleFiles({
264277
'src/styles.scss': `
265278
@import "font-awesome/scss/font-awesome";
@@ -271,6 +284,7 @@ describe('Browser Builder styles', () => {
271284
});
272285

273286
it(`supports font-awesome imports (tilde)`, async () => {
287+
mockFontAwesomePackage(host);
274288
host.writeMultipleFiles({
275289
'src/styles.scss': `
276290
$fa-font-path: "~font-awesome/fonts";

scripts/validate-licenses.ts

-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ const ignoredPackages = [
7575
'[email protected]', // MIT but broken license in package.json
7676
'[email protected]', // Unlicense but missing license field (PR: https://github.com/streamich/fs-monkey/pull/209)
7777
'[email protected]', // Unlicense but missing license field (PR: https://github.com/streamich/memfs/pull/594)
78-
79-
// * Other
80-
'[email protected]', // (OFL-1.1 AND MIT)
8178
];
8279

8380
// Ignore own packages (all MIT)

yarn.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124

125125
"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#80fc63daf535db5a7df49eb8c1dd2f86be28660a":
126126
version "0.0.0-66fefa85b03fe2265f8a564b1f72f06a08f66250"
127-
uid "80fc63daf535db5a7df49eb8c1dd2f86be28660a"
128127
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#80fc63daf535db5a7df49eb8c1dd2f86be28660a"
129128
dependencies:
130129
"@angular-devkit/build-angular" "14.1.0-rc.3"
@@ -199,13 +198,20 @@
199198
dependencies:
200199
tslib "^2.3.0"
201200

202-
"@angular/[email protected]", "@angular/core@^13.0.0 || ^14.0.0-0":
201+
"@angular/[email protected]":
203202
version "14.1.0"
204203
resolved "https://registry.yarnpkg.com/@angular/core/-/core-14.1.0.tgz#5a0fa164ca180027d4c54a5b70e7357918f9af9b"
205204
integrity sha512-3quEsHmQifJOQ2oij5K+cjGjmhsKsyZI1+OTHWNZ6IXeuYviZv4U/Cui9fUJ1RN3CZxH3NzWB3gB/5qYFQfOgg==
206205
dependencies:
207206
tslib "^2.3.0"
208207

208+
"@angular/core@^13.0.0 || ^14.0.0-0":
209+
version "14.0.6"
210+
resolved "https://registry.yarnpkg.com/@angular/core/-/core-14.0.6.tgz#697d52ca9d772877a5138af26d1d9c5e7c267ade"
211+
integrity sha512-hyQ3s9Yrm3ejhumgAC9ENhMFmvmPlJkk1tEOjruyoiHwK4EOaDpI+GCNQIBUB1Z3B/QLMlgZeMXrULQztjSQwg==
212+
dependencies:
213+
tslib "^2.3.0"
214+
209215
"@angular/[email protected]":
210216
version "14.1.0"
211217
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-14.1.0.tgz#17a7ec211a11b75572d89359f08c277cfcdb1210"
@@ -231,7 +237,6 @@
231237

232238
"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#64aa04a20d8b2f868322dab6e4ede0af46ed412f":
233239
version "0.0.0-66fefa85b03fe2265f8a564b1f72f06a08f66250"
234-
uid "64aa04a20d8b2f868322dab6e4ede0af46ed412f"
235240
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#64aa04a20d8b2f868322dab6e4ede0af46ed412f"
236241
dependencies:
237242
"@yarnpkg/lockfile" "^1.1.0"
@@ -5761,11 +5766,6 @@ follow-redirects@^1.0.0, follow-redirects@^1.14.0:
57615766
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5"
57625767
integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==
57635768

5764-
font-awesome@^4.7.0:
5765-
version "4.7.0"
5766-
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
5767-
integrity sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==
5768-
57695769
foreground-child@^2.0.0:
57705770
version "2.0.0"
57715771
resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53"

0 commit comments

Comments
 (0)