Repository navigation
Fix shebang position in cli.ts after license header addition - #103
Merged
huangyiirene merged 2 commits intoJan 18, 2026
Merged
huangyiirene merged 2 commits into
huangyiirene merged 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add action step refactor for optimization
Fix shebang position in cli.ts after license header addition
Jan 18, 2026
huangyiirene
marked this pull request as ready for review
January 18, 2026 05:24
huangyiirene
merged commit Jan 18, 2026
bd8ae74
into
copilot/add-mit-license-headers
1 of 2 checks passed
os-warren
added a commit
that referenced
this pull request
Sep 8, 2026
…#8598) Lands the manifest half the card held for the stop-and-report point, ruled **A** by the director seat's decision batch #103. `packages/types` now builds `tsc && vite build && node ../../scripts/check-dist-completeness.mjs`, and declares `vite` explicitly like the other 23 packages that carry a `vite.config.ts`. With this, `dist/zod/index.zod.js` is ONE self-contained module and a consumer importing a single schema from `@object-ui/types/zod` gets the same accept set as one importing the barrel: a nested off-spec node is REFUSED where it was silently ACCEPTED. The lockfile is settled in the same commit, per the ruling's two measurable conditions. The importer block is pinned to the resolution already locked for 28 of the 29 existing vite importers, so the diff is exactly three added lines and `vite` stays at ONE version across all 30 importers. A naive install was measured first and rejected: it lands 8.2.2 beside the rest and drags an unrelated `picomatch` / `rolldown` refresh with it. Also lands the two pins that could not travel without this: - `package-exports-manifest.test.ts` asks, by design, for its build-script expectation to be edited and justified when a bundler step arrives. The justification is written in: lib mode, `formats: ['es']`, ONE format, so the `require`-less exports map below it stays correct. - `zod-subpath-single-module-8598.dist.spec.tsx` is the built-artifact pin — the shipped barrel imports no sibling category module, and `CardSchema` from it REFUSES the nested off-spec node while still accepting the well-formed control. `zod-subpath-bundle-config-8598.test.ts` moves its config import behind a variable specifier. A literal one pulls `vite.config.ts` into this package's type program (`tsconfig.test.json` compiles every test, deliberately), and the config imports the untyped `vitest-invocation-guard.mjs` — TS7016, measured on this tree. The runtime import, and every assertion, is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 9, 2026
…stack-ai#8598) (objectstack-ai#8646) * build(types): add the lib-mode `./zod` bundle config (objectui#8598) Build the `./zod` subpath as ONE module, so the objectui#8344 node recursion-point fill survives a bundler that honours `"sideEffects": false`. The config overwrites `dist/zod/index.zod.js` in place, after `tsc` has written the rest of `dist/`; no schema, no `exports` entry and no publish contract field moves. The manifest half — `packages/types` `build` running `vite build` between `tsc` and the completeness count — is deliberately NOT in this commit. It is the card's stop-and-report point and is posted on objectui#8598 for approval, so the config here is inert until it lands. Two further files are withheld with it because they are RED until it lands, measured rather than assumed: the built-artifact pin for the bundled face, and the build-script expectation in `package-exports-manifest.test.ts` that asks, by design, to be edited and justified when a bundler step arrives. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w * build(types)!: run the `./zod` bundle from the build script (objectui#8598) Lands the manifest half the card held for the stop-and-report point, ruled **A** by the director seat's decision batch objectstack-ai#103. `packages/types` now builds `tsc && vite build && node ../../scripts/check-dist-completeness.mjs`, and declares `vite` explicitly like the other 23 packages that carry a `vite.config.ts`. With this, `dist/zod/index.zod.js` is ONE self-contained module and a consumer importing a single schema from `@object-ui/types/zod` gets the same accept set as one importing the barrel: a nested off-spec node is REFUSED where it was silently ACCEPTED. The lockfile is settled in the same commit, per the ruling's two measurable conditions. The importer block is pinned to the resolution already locked for 28 of the 29 existing vite importers, so the diff is exactly three added lines and `vite` stays at ONE version across all 30 importers. A naive install was measured first and rejected: it lands 8.2.2 beside the rest and drags an unrelated `picomatch` / `rolldown` refresh with it. Also lands the two pins that could not travel without this: - `package-exports-manifest.test.ts` asks, by design, for its build-script expectation to be edited and justified when a bundler step arrives. The justification is written in: lib mode, `formats: ['es']`, ONE format, so the `require`-less exports map below it stays correct. - `zod-subpath-single-module-8598.dist.spec.tsx` is the built-artifact pin — the shipped barrel imports no sibling category module, and `CardSchema` from it REFUSES the nested off-spec node while still accepting the well-formed control. `zod-subpath-bundle-config-8598.test.ts` moves its config import behind a variable specifier. A literal one pulls `vite.config.ts` into this package's type program (`tsconfig.test.json` compiles every test, deliberately), and the config imports the untyped `vitest-invocation-guard.mjs` — TS7016, measured on this tree. The runtime import, and every assertion, is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w * fix(cli): stop a spawned build inheriting VITEST (objectui#8598) `Test (shard 2/4)` went red on `8b8cbfd` on a diff that touched no test. `cli-bin.test.ts` self-builds `@object-ui/types` when the zod bundle is absent — CI's test job has no build step by design — and it spawned `pnpm --filter @object-ui/types run build` with the vitest worker's whole environment. Vitest sets `VITEST=true`; children inherit it; all 24 `packages/*` vite configs open with `if (process.env.VITEST) { assertCanonicalVitestInvocation(...) }`; and that guard derives its vitest root from `cwd`, which `pnpm --filter` sets to the package directory. So the guard read a build as a vitest run launched from the wrong place and exited 1 before the bundler started. ⭐ The build script, the spawning test and the guard are each correct alone. This PR created the intersection by making `@object-ui/types` the first vite-built package that a test builds from inside vitest; the cli's own self-build survives only because it builds with `tsup`. Fixed at the SPAWN — the environment is what is false there, and it is the one place that knows the child is a build rather than a test run. ⛔ Not fixed by gating the config on vite's `command`: that diverges 1 of 24 byte-identical guard blocks, and `scripts/__tests__/vitest-invocation-guard.test.ts` refuses that divergence mechanically — its own case name is "gates that call on VITEST, so `vite build` is never refused", i.e. the property the leak falsifies from outside, where no config can see it. `scripts/__tests__/spawned-build-vitest-env-8598.test.ts` keeps the class shut: it derives every build spawn in the test tree by AST, resolves an `env:` identifier to its declaration, and requires `VITEST` to be scrubbed. Both of today's spawns are covered; a third cannot land unguarded. Also lands the two owed items from the review: the unit pin's header now says that importing the config EXECUTES that same guard and why it passes here, and the changeset gains the deep-link sentence — a raw-path sibling keeps the pre-objectstack-ai#8344 accept set, is not reachable through `exports` (`ERR_PACKAGE_PATH_NOT_EXPORTED`), and mixing it with the bundled entry yields two distinct schema instances (measured). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #102 added MIT license headers to all source files, but placed them above the shebang in
packages/cli/src/cli.ts, causing build failure. Shebangs must be on line 1 to function.Changes
#!/usr/bin/env nodeto line 1, license header follows immediately afterBefore/After
This resolves the TypeScript error
TS18026: '#!' can only be used at the start of a filethat broke the Bundle Size Check workflow.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.