Skip to content

Commit 4d930d8

Browse files
author
Angular Builds
committed
08aa5c615 fix(@angular-devkit/core): json visitors should only set writable properties
1 parent 59d6fc2 commit 4d930d8

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@angular-devkit/build-webpack",
3-
"version": "0.900.0-next.6+3.87153f1",
3+
"version": "0.900.0-next.6+8.08aa5c6",
44
"description": "Webpack Builder for Architect",
55
"experimental": true,
66
"main": "src/index.js",
77
"typings": "src/index.d.ts",
88
"builders": "builders.json",
99
"dependencies": {
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#87153f159",
11-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#87153f159",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#08aa5c615",
11+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#08aa5c615",
1212
"rxjs": "6.5.3",
1313
"webpack-merge": "4.2.2"
1414
},

src/utils.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
import * as webpack from 'webpack';
99
export interface EmittedFiles {
10+
id?: string;
1011
name?: string;
1112
file: string;
1213
initial: boolean;

src/utils.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
const path = require("path");
1111
function getEmittedFiles(compilation) {
1212
const files = [];
13-
// entrypoints might have multiple outputs
14-
// such as runtime.js
15-
for (const [name, entrypoint] of compilation.entrypoints) {
16-
const entryFiles = (entrypoint && entrypoint.getFiles()) || [];
17-
for (const file of entryFiles) {
18-
files.push({ name, file, extension: path.extname(file), initial: true });
19-
}
20-
}
2113
// adds all chunks to the list of emitted files such as lazy loaded modules
22-
for (const chunk of Object.values(compilation.chunks)) {
14+
for (const chunk of compilation.chunks) {
2315
for (const file of chunk.files) {
2416
files.push({
17+
id: chunk.id.toString(),
2518
name: chunk.name,
2619
file,
2720
extension: path.extname(file),

src/webpack/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface WebpackFactory {
2020
}
2121
export declare type BuildResult = BuilderOutput & {
2222
emittedFiles?: EmittedFiles[];
23+
webpackStats?: webpack.Stats.ToJsonOutput;
2324
};
2425
export declare function runWebpack(config: webpack.Configuration, context: BuilderContext, options?: {
2526
logging?: WebpackLoggingCallback;

src/webpack/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function runWebpack(config, context, options = {}) {
3333
log(stats, config);
3434
obs.next({
3535
success: !stats.hasErrors(),
36+
webpackStats: stats.toJson(),
3637
emittedFiles: utils_1.getEmittedFiles(stats.compilation),
3738
});
3839
if (!config.watch) {

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu Sep 26 2019 17:34:12 GMT+0000 (Coordinated Universal Time)
1+
Thu Sep 26 2019 17:35:00 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)