angular/.github/workflows
JiaLiPassion 08b0c87a94 fix(zone.js): Promise.resolve(subPromise) should return subPromise (#53423)
In the original `Promise` impelmentation, zone.js follow the spec from
https://promisesaplus.com/#point-51.

```
const p1 = Promise.resolve(1);
const p2 = Promise.resolve(p1);

p1 === p2; // false
```
in this case, `p2` should be the same status with `p1` but they are
still different instances.

And for some edge case.

```
class MyPromise extends Promise {
  constructor(sub) {
    super((res) => res(null));
    this.sub = sub;
  }
  then(onFufilled, onRejected) {
    this.sub.then(onFufilled, onRejected);
  }
}

const p1 = new Promise(setTimeout(res), 100);
const myP = new MyPromise(p1);
const r = await myP;
r === 1; // false
```

So in the above code, `myP` is not the same instance with `p1`,
and since `myP` is resolved in constructor, so `await myP` will
just pass without waiting for `p1`.

And in the current `tc39` spec here https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-promise-resolve
`Promise.resolve(subP)` should return `subP`.

```
const p1 = Promise.resolve(1);
const p2 = Promise.resolve(p1);

p1 === p2; // true
```

So the above `MyPromise` can wait for the `p1` correctly.

PR Close #53423
2023-12-11 10:55:12 -08:00
..
aio-preview-build.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
aio-preview-deploy.yml build: update actions/checkout digest to b4ffde6 (#52252) 2023-11-02 10:32:11 -07:00
assistant-to-the-branch-manager.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
benchmark-compare.yml build: update peter-evans/create-or-update-comment digest to 23ff157 (#52279) 2023-11-02 10:43:16 -07:00
ci-privileged.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
ci.yml fix(zone.js): Promise.resolve(subPromise) should return subPromise (#53423) 2023-12-11 10:55:12 -08:00
dev-infra.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
feature-requests.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
google-internal-tests.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
merge-ready-status.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
monitoring.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
scorecard.yml build: update scorecard action dependencies (#52126) 2023-10-18 17:45:28 +02:00
update-cli-help.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00
update-events.yml build: update cross-repo angular dependencies (#52191) 2023-10-26 14:12:34 -07:00