From 09d2f04d1bff3797da8e30334c95d7484e244eb5 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 28 Aug 2019 09:10:26 +0200 Subject: [PATCH] fix(@angular-devkit/build-angular): update worker-plugin to 3.2.0 (#15456) includes this fix https://github.com/GoogleChromeLabs/worker-plugin/pull/35 which solves the below issues. Fixes #15188 and fixes #14582 --- packages/angular_devkit/build_angular/package.json | 2 +- .../test/browser/web-worker_spec_large.ts | 11 +---------- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 53e1247a988d..837860f4b9df 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -61,7 +61,7 @@ "webpack-sources": "1.4.3", "webpack-subresource-integrity": "1.1.0-rc.6", "worker-farm": "1.7.0", - "worker-plugin": "3.1.0" + "worker-plugin": "3.2.0" }, "devDependencies": { "@angular/animations": "~9.0.0-next.3", diff --git a/packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts b/packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts index 99e2ce078aeb..208618272b82 100644 --- a/packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts +++ b/packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts @@ -162,17 +162,8 @@ describe('Browser Builder Web Worker support', () => { case 2: workerContent = virtualFs.fileBufferToString(host.scopedSync().read(workerPath)); - // TODO(filipesilva): Should this change? Check with Jason Miller. - // The worker changes name with each rebuild. But sometimes it also changes from 0 to - // 1 and then back to 0. It's hard to know where the updated content is, but it should - // be in one of these two. - const anotherWorkerPath = join(outputPath, '1.worker.js'); - const anotherWorkerContent = virtualFs.fileBufferToString( - host.scopedSync().read(anotherWorkerPath)); // Worker content should have changed. - expect( - workerContent.includes('baz') || anotherWorkerContent.includes('baz'), - ).toBeTruthy('Worker bundle did not contain updated content.'); + expect(workerContent).toContain('baz'); phase = 3; break; } diff --git a/yarn.lock b/yarn.lock index 8b2db515d245..dca918f1ea8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12279,10 +12279,10 @@ worker-farm@1.7.0, worker-farm@^1.7.0: dependencies: errno "~0.1.7" -worker-plugin@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/worker-plugin/-/worker-plugin-3.1.0.tgz#6311778f3514a87c273510ee3f809cc3fe161e6f" - integrity sha512-iQ9KTTmmN5fhfc2KMR7CcDblvcrg1QQ4pXymqZ3cRZF8L0890YLBcEqlIsGPdxoFwghyN8RA1pCEhCKuTF4Lkw== +worker-plugin@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/worker-plugin/-/worker-plugin-3.2.0.tgz#ddae9f161b76fcbaacf8f54ecd037844584e43e7" + integrity sha512-W5nRkw7+HlbsEt3qRP6MczwDDISjiRj2GYt9+bpe8A2La00TmJdwzG5bpdMXhRt1qcWmwAvl1TiKaHRa+XDS9Q== dependencies: loader-utils "^1.1.0"