Skip to content

chore(release): 1.0.7 - #75

Merged
msalvatti merged 2 commits into
mainfrom
chore/release-1.0.7
Aug 4, 2026
Merged

chore(release): 1.0.7#75
msalvatti merged 2 commits into
mainfrom
chore/release-1.0.7

Conversation

@msalvatti

Copy link
Copy Markdown
Member

What this releases

The reflect-metadata fix merged in #74, plus the documentation that fix makes
necessary.

This is a runtime change, not a documentation release. dist/ differs from 1.0.6:

$ diff -rq <published 1.0.6>/dist dist
dist/server/index.cjs   differ
dist/server/index.mjs   differ
dist/server/index.d.ts  differ
dist/server/index.d.cts differ

The functional difference is one line — import 'reflect-metadata' is gone from the
bundle. Everything else in the diff is bundler comments and three blank lines in the
declarations. The public surface is byte-identical, verified by comparing the
export { … } blocks of the published 1.0.6 bundle and this build.

Why the library should not load the polyfill

reflect-metadata is global state the application initialises once. None of the other
eight @bymax-one libraries imports it, and NestJS pulls it in regardless — measured
in a clean process:

$ node -e "console.log(typeof Reflect.defineMetadata)"                    → undefined
$ node -e "await import('@nestjs/common'); console.log(typeof Reflect.defineMetadata)" → function

The decorators are reachable only through the . subpath, whose bundle imports
@nestjs/common on its first line, so the polyfill is present before any decorator
body runs. Confirmed with a real consumer that never imports it itself:

processo vazio                 → undefined
após importar só { Processor } → function
Processor('q')(C)              → ok

It also contradicted this package's own "sideEffects": false — a flag asserting no
module has a side effect, on a package importing something whose entire purpose is one.

The measurable cost was in consumers' bundles: with the import present, esbuild inlines
the polyfill, taking a minimal bundle from 53 kB to 95 kB even when the application
had already loaded it.

Documentation

The fix removes a redundancy that was silently covering a missing main.ts import, so
the README now says what it previously left implicit:

  • Quick Start shows the main.ts entry point with import 'reflect-metadata' first,
    and the install line includes the package.
  • Peer matrix carries an IMPORTANT note: the polyfill belongs to the application,
    this library never imports it, and NestJS brings it in too.

Previously reflect-metadata appeared only as a row in the peer table — survivable
while the library loaded it, not now.

Verification

typecheck · lint · size · check:exports · check:published · test:types ·
276 tests / 100% coverage · smoke — the gate that loads the built tarball from
a real consumer in ESM and CJS, which is the exact path this change could have broken
· npm publish --dry-run completing through to + @bymax-one/nest-queue@1.0.7.

After merge

git switch main && git pull first, then git tag v1.0.7 && git push origin v1.0.7, so
the tag lands on the squash commit.

Runtime change: the four decorators no longer carry a `reflect-metadata`
side-effect import, so `dist/` differs from 1.0.6 — the built bundle no longer
references the package at all.

The README gained what the fix makes necessary: the Quick Start now shows the
`main.ts` entry point with `import 'reflect-metadata'` as its first line, and the
peer matrix states that the polyfill belongs to the application. Naming it only as a
peer was survivable while the library loaded it, and is not now.
Copilot AI lite review requested due to automatic review settings August 4, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release prep for @bymax-one/nest-queue@1.0.7, documenting and packaging the prior runtime change that removes the library’s reflect-metadata side-effect import so the application owns the polyfill.

Changes:

  • Bump package version to 1.0.7.
  • Update README to explicitly instruct consumers to install and import reflect-metadata in main.ts.
  • Add 1.0.7 release notes and compare link to the changelog.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Updates Quick Start and peer guidance so reflect-metadata is explicitly owned/imported by the application.
package.json Bumps version to 1.0.7 for the release.
CHANGELOG.md Adds the 1.0.7 entry documenting the runtime change and README updates, plus the compare link.

Comment thread README.md Outdated
…mple

The example used top-level await. A default NestJS project compiles `main.ts` to
CommonJS, where top-level await does not exist — so copying the snippet fails to
compile, in the one example whose entire purpose is to be copied.

It follows the `bootstrap()` shape the NestJS CLI generates, which works under both
module systems.
Copilot AI review requested due to automatic review settings August 4, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@msalvatti
msalvatti merged commit 3d8dd7f into main Aug 4, 2026
18 checks passed
@msalvatti
msalvatti deleted the chore/release-1.0.7 branch August 4, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants