Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4798ec4

Browse files
alan-agius4thePunderWoman
authored andcommitted
fix(zone.js): add conditional exports to zone.js package (#51652)
This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like `zone.js/fesm2015/zone-node.js` due to disallowed directory imports. PR Close #51652
1 parent fe0b793 commit 4798ec4

File tree

74 files changed

+62
-883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+62
-883
lines changed

β€ŽWORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ yarn_install(
7979
YARN_LABEL,
8080
"//:.yarnrc",
8181
"//tools:postinstall-patches.js",
82-
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-8d4803573edc70b90a1134ffa996303d1dcc18a9.patch",
82+
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-0109d498b0f6aae418ed4924a5e5c65695f0ac61.patch",
8383
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.8.1.patch",
8484
"//tools/esm-interop:patches/npm/@bazel+esbuild+5.7.1.patch",
8585
"//tools/esm-interop:patches/npm/@bazel+protractor+5.7.1.patch",

β€Žintegration/cli-elements-universal/angular.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"index": "src/index.html",
2222
"main": "src/main.ts",
2323
"polyfills": [
24-
"zone.js/dist/zone"
24+
"zone.js"
2525
],
2626
"tsConfig": "tsconfig.app.json",
2727
"aot": true,
@@ -83,7 +83,7 @@
8383
"options": {
8484
"main": "src/test.ts",
8585
"polyfills": [
86-
"zone.js/dist/zone"
86+
"zone.js"
8787
],
8888
"tsConfig": "tsconfig.spec.json",
8989
"karmaConfig": "karma.conf.js",

β€Žintegration/cli-elements-universal/src/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

3-
import 'zone.js/dist/zone-testing';
3+
import 'zone.js/testing';
44
import { getTestBed } from '@angular/core/testing';
55
import {
66
BrowserDynamicTestingModule,

β€Žintegration/injectable-def/src/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// ZoneJS does not add any package exports right now, so we need to directly
2-
// reference the ESM entry-point for ZoneJS in NodeJS.
3-
// TODO: Replace this with a package import if ZoneJS sets the `exports` field.
4-
import 'zone.js/fesm2015/zone-node.js';
1+
import 'zone.js/node';
52

63
// Load the Angular compiler as we will rely on JIT compilation for this test.
74
// This test does not use the CLI and we are not processing the framework packages

β€Žpackages/zone.js/BUILD.bazel

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,12 @@ pkg_npm(
5353
"CHANGELOG.md",
5454
"README.md",
5555
"package.json",
56-
"//packages/zone.js/mix:package.json",
57-
"//packages/zone.js/node:package.json",
58-
"//packages/zone.js/testing:package.json",
5956
],
6057
visibility = ["//visibility:public"],
6158
deps = [
6259
":LICENSE.wrapped",
6360
":LICENSE_copy",
6461
":zone_externs",
65-
"//packages/zone.js/dist:dist_bundle_group",
66-
"//packages/zone.js/plugins:plugin_bundle_group",
6762
] + [
6863
"//packages/zone.js/bundles:" + b + "-es5.dist"
6964
for b in BUNDLES_ENTRY_POINTS.keys()

β€Žpackages/zone.js/dist/BUILD.bazel

Lines changed: 0 additions & 125 deletions
This file was deleted.

β€Žpackages/zone.js/dist/tools.bzl

Lines changed: 0 additions & 71 deletions
This file was deleted.

β€Žpackages/zone.js/mix/BUILD.bazel

Lines changed: 0 additions & 3 deletions
This file was deleted.

β€Žpackages/zone.js/mix/package.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

β€Žpackages/zone.js/node/BUILD.bazel

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
Β (0)