Repository navigation
Commit e90fe2e
committed
π Authorize the root import only where a tier closes it (#758)
CI found a regression the whole local battery missed.
The protected tier is present in every execution, so `ExecutionImports` is now
built unconditionally β it used to be `undefined` for a run with no bundle and
no declarations. The root import read that as permission to authorize:
imports === undefined ? imported : imports.authorize("__root__", imported)
With the authority always present, that asks a question nothing answers β
`__root__` is claimed by no tier unless a bundle closes the execution β and an
ordinary run's root refuses with *this execution authorizes no import of this
name*. It now asks only when a tier actually closes the name, which is the rule
every other import already followed, and restores the previous behaviour exactly:
absent authority and unclosed name both skip authorization, a bundle still
closes the execution and still authorizes its root.
Also restores the `documentation-validation.test.ts` exclusion I removed last
round. My reasoning then was that the test shells out to `deno` and so is
portable, and it does pass under a local Bun β because a developer machine has
Deno installed. The CI Bun shard does not: every case fails with `Executable not
found in $PATH: "deno"`. Needing the `deno` executable is exactly as
disqualifying as calling `Deno.*`, and the local pass was the misleading signal.
Verified: `deno task test packages/core/tests/` β 352 passed, 0 failed.1 parent d9985f1 commit e90fe2e
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1900 | 1900 | | |
1901 | 1901 | | |
1902 | 1902 | | |
1903 | | - | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
1904 | 1912 | | |
1905 | 1913 | | |
1906 | 1914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
0 commit comments