You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(compile): drop unused ADO_AW_IMPORT_BASE env var
`import.js` consults `ADO_AW_IMPORT_BASE` only when resolving a
relative marker path (`isAbsolute(rawPath) ? rawPath : resolve(base,
rawPath)`). In the pipeline the only marker `import.js` ever sees is
the compiler-generated top-level body marker, which embeds an absolute
`$(Build.SourcesDirectory)/...` path. The resolver is also single-pass
by design, so author-written nested relative markers inside the inlined
body are never re-expanded at runtime. The env var was therefore dead
code at runtime.
Changes:
- Remove the `env:` block from `resolver_step()` in
`src/compile/extensions/ado_script.rs` (and update its unit test to
assert the variable is absent).
- Drop the `process.env.ADO_AW_IMPORT_BASE ??` fallback in
`scripts/ado-script/src/import/index.ts`; `import.js` now always
uses `dirname(argv[2])` for relative-path resolution (irrelevant in
pipeline use, useful for local invocations).
- Replace the `ADO_AW_IMPORT_BASE`-override vitest with a
`dirname(target)` default-base test that pins the fallback for
standalone callers.
- Update `docs/ado-script.md` and `docs/runtime-imports.md` to drop
the env-var contract and explain why the runtime never sees a
relative marker.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
"resolver step must not export ADO_AW_IMPORT_BASE — the compiler emits absolute marker paths and import.js is single-pass, so the env var would never be consulted"
0 commit comments