Skip to content

Commit 93f6f86

Browse files
author
Angular Builds
committed
89b9d9492 build: update dev-infra packages
1 parent 9bd941e commit 93f6f86

17 files changed

+196
-38
lines changed

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "15.2.0-next.0+sha-ebacf58",
3+
"version": "15.2.0-next.0+sha-89b9d94",
44
"description": "Angular Webpack Build Facade",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "2.2.0",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#ebacf58e0",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#ebacf58e0",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#ebacf58e0",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#89b9d9492",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#89b9d9492",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#89b9d9492",
1313
"@babel/core": "7.20.12",
1414
"@babel/generator": "7.20.7",
1515
"@babel/helper-annotate-as-pure": "7.18.6",
@@ -20,7 +20,7 @@
2020
"@babel/runtime": "7.20.7",
2121
"@babel/template": "7.20.7",
2222
"@discoveryjs/json-ext": "0.5.7",
23-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#ebacf58e0",
23+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#89b9d9492",
2424
"ansi-colors": "4.1.3",
2525
"autoprefixer": "10.4.13",
2626
"babel-loader": "9.1.2",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
import type { Metafile, PartialMessage } from 'esbuild';
9+
/**
10+
* Checks the input files of a build to determine if any of the files included
11+
* in the build are not ESM. ESM files can be tree-shaken and otherwise optimized
12+
* in ways that CommonJS and other module formats cannot. The esbuild metafile
13+
* information is used as the basis for the analysis as it contains information
14+
* for each input file including its respective format.
15+
*
16+
* If any allowed dependencies are provided via the `allowedCommonJsDependencies`
17+
* parameter, both the direct import and any deep imports will be ignored and no
18+
* diagnostic will be generated.
19+
*
20+
* If a module has been issued a diagnostic message, then all descendant modules
21+
* will not be checked. This prevents a potential massive amount of inactionable
22+
* messages since the initial module import is the cause of the problem.
23+
*
24+
* @param metafile An esbuild metafile object to check.
25+
* @param allowedCommonJsDependencies An optional list of allowed dependencies.
26+
* @returns Zero or more diagnostic messages for any non-ESM modules.
27+
*/
28+
export declare function checkCommonJSModules(metafile: Metafile, allowedCommonJsDependencies?: string[]): PartialMessage[];

src/builders/browser-esbuild/commonjs-checker.js

+122
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/builders/browser-esbuild/esbuild.d.ts

+3-3
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
import { BuilderContext } from '@angular-devkit/architect';
9-
import { BuildFailure, BuildInvalidate, BuildOptions, BuildResult, Message, OutputFile } from 'esbuild';
9+
import { BuildFailure, BuildInvalidate, BuildOptions, BuildResult, OutputFile, PartialMessage } from 'esbuild';
1010
import { FileInfo } from '../../utils/index-file/augment-index-html';
1111
/**
1212
* Determines if an unknown value is an esbuild BuildFailure error object thrown by esbuild.
@@ -32,6 +32,6 @@ export declare function bundle(workspaceRoot: string, optionsOrInvalidate: Build
3232
outputFiles?: never;
3333
})>;
3434
export declare function logMessages(context: BuilderContext, { errors, warnings }: {
35-
errors: Message[];
36-
warnings: Message[];
35+
errors: PartialMessage[];
36+
warnings: PartialMessage[];
3737
}): Promise<void>;

0 commit comments

Comments
 (0)