From fa27f364ce6c510da8e14606ea1b070b38b14338 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jul 2024 21:51:59 +0000 Subject: [PATCH] chore(release): release latest changelog --- .changeset/flat-mirrors-film.md | 17 ------ .changeset/shaggy-readers-reflect.md | 64 ---------------------- CHANGELOG.md | 79 ++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 80 insertions(+), 82 deletions(-) delete mode 100644 .changeset/flat-mirrors-film.md delete mode 100644 .changeset/shaggy-readers-reflect.md diff --git a/.changeset/flat-mirrors-film.md b/.changeset/flat-mirrors-film.md deleted file mode 100644 index 1b31ea0d..00000000 --- a/.changeset/flat-mirrors-film.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@freshgum/typedi': patch ---- - -The code for virtual tokens (such as `HostContainer()`) has been moved into individual tokens, -as opposed to hosting logic for these tokens in `ContainerInstance`. - -This means that we no longer have to check for individual tokens in the container's -`.get` code-path, [which has historically been the case.](https://github.com/freshgum-bubbles/typedi/blob/cd4b8437ac14882a0ed4d1964d76e29b32bd1b3e/src/container-instance.class.mts#L331) - -Instead, logic for these tokens is now moved into special tokens called Executable Tokens. - -This yields numerous advantages, one of which being that, should a certain special token go -unused, its code can safely be removed from a bundle via dead-code elimination. - -While **this is mostly an internal change**, the concept of Executable Tokens works quite well, -and so I'm considering making it part of the public API surface + documentation after further testing. diff --git a/.changeset/shaggy-readers-reflect.md b/.changeset/shaggy-readers-reflect.md deleted file mode 100644 index c9365745..00000000 --- a/.changeset/shaggy-readers-reflect.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -'@freshgum/typedi': patch ---- - -Dedicated entry-points have been added for web-facing builds ([#184][gh-issue-184]). -You're now able to use modules from contrib/ without relying on a bundler, -or importing contrib/ packages separately from `/esm5/`. - -> [!NOTE] > **The changes made here do not impact current UMD / MJS entry-points.** -> -> If you're using these, you won't experience any changes. -> To make use of contrib/ modules, you'll need to switch to the new builds shown above. - -The new entry-points are as follows (all files are under `./build/bundles/`): - -- `typedi.full.min.mjs` (ES Module format.) -- `typedi.full.mjs` -- `typedi.umd.full.js` ([UMD][umd-module-explainer] modules.) -- `typedi.umd.full.min.js` - -You can now do the following: - -```js -import Container, { Contrib } from 'https://unpkg.dev/@freshgum/typedi/build/bundles/typedi.full.mjs'; - -// Let's use some modules: -const { TransientRef, ES } = Contrib; -assert(TransientRef.TransientRefHost); -``` - -The same can be done using UMD modules, like so: - -```html - - - - - - - - - - - -``` - -> [!TIP] -> If you've noticed, you can actually import the Container through unpkg! -> -> Here's a link to the latest bundles: https://unpkg.dev/browse/@freshgum/typedi/build/bundles/ - ---- - -I've been wanting to implement this for a while, but life has repeatedly found itself in the way. -When spending some time on it, it was mostly a simple job: the majority of the work lied in creating -a new build step to generate a barrel file for contrib/, and then integrating Rollup with that. - -If you're interested, the original code for this lies in [#184][gh-issue-184]. It's actually quite interesting! - -[umd-module-explainer]: https://jameshfisher.com/2020/10/04/what-are-umd-modules/ -[gh-issue-184]: https://github.com/freshgum-bubbles/typedi/pull/184 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b928b77..885919f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,84 @@ # @freshgum/typedi +## 0.7.3 + +### Patch Changes + +- 02fe3cc: The code for virtual tokens (such as `HostContainer()`) has been moved into individual tokens, + as opposed to hosting logic for these tokens in `ContainerInstance`. + + This means that we no longer have to check for individual tokens in the container's + `.get` code-path, [which has historically been the case.](https://github.com/freshgum-bubbles/typedi/blob/cd4b8437ac14882a0ed4d1964d76e29b32bd1b3e/src/container-instance.class.mts#L331) + + Instead, logic for these tokens is now moved into special tokens called Executable Tokens. + + This yields numerous advantages, one of which being that, should a certain special token go + unused, its code can safely be removed from a bundle via dead-code elimination. + + While **this is mostly an internal change**, the concept of Executable Tokens works quite well, + and so I'm considering making it part of the public API surface + documentation after further testing. + +- ad8f4f6: Dedicated entry-points have been added for web-facing builds ([#184][gh-issue-184]). + You're now able to use modules from contrib/ without relying on a bundler, + or importing contrib/ packages separately from `/esm5/`. + + > [!NOTE] > **The changes made here do not impact current UMD / MJS entry-points.** + > + > If you're using these, you won't experience any changes. + > To make use of contrib/ modules, you'll need to switch to the new builds shown above. + + The new entry-points are as follows (all files are under `./build/bundles/`): + + - `typedi.full.min.mjs` (ES Module format.) + - `typedi.full.mjs` + - `typedi.umd.full.js` ([UMD][umd-module-explainer] modules.) + - `typedi.umd.full.min.js` + + You can now do the following: + + ```js + import Container, { Contrib } from 'https://unpkg.dev/@freshgum/typedi/build/bundles/typedi.full.mjs'; + + // Let's use some modules: + const { TransientRef, ES } = Contrib; + assert(TransientRef.TransientRefHost); + ``` + + The same can be done using UMD modules, like so: + + ```html + + + + + + + + + + + + ``` + + > [!TIP] + > If you've noticed, you can actually import the Container through unpkg! + > + > Here's a link to the latest bundles: https://unpkg.dev/browse/@freshgum/typedi/build/bundles/ + + *** + + I've been wanting to implement this for a while, but life has repeatedly found itself in the way. + When spending some time on it, it was mostly a simple job: the majority of the work lied in creating + a new build step to generate a barrel file for contrib/, and then integrating Rollup with that. + + If you're interested, the original code for this lies in [#184][gh-issue-184]. It's actually quite interesting! + + [umd-module-explainer]: https://jameshfisher.com/2020/10/04/what-are-umd-modules/ + [gh-issue-184]: https://github.com/freshgum-bubbles/typedi/pull/184 + ## 0.7.2 ### Patch Changes diff --git a/package.json b/package.json index 61cf16c3..17f3fb7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@freshgum/typedi", - "version": "0.7.2", + "version": "0.7.3", "description": "Elegant Dependency Injection in JavaScript and TypeScript.", "homepage": "https://typedi.js.org", "main": "./build/esm5/entry/index.mjs",