From cd7926760b932d06efe1c0d62797bda471fb27d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Aug 2022 15:12:09 +0200 Subject: [PATCH] Create release (#36) --- .changeset/big-laws-rhyme.md | 9 ----- .changeset/breezy-planes-shop.md | 5 --- .changeset/eight-snails-hope.md | 7 ---- .changeset/nasty-mice-check.md | 9 ----- .changeset/new-maps-destroy.md | 11 ------ .changeset/olive-pillows-bathe.md | 5 --- .changeset/quick-wasps-refuse.md | 7 ---- .changeset/rare-pets-provide.md | 7 ---- .changeset/spotty-meals-prove.md | 16 -------- .changeset/yellow-penguins-clean.md | 5 --- CHANGELOG.md | 57 +++++++++++++++++++++++++++++ package.json | 2 +- 12 files changed, 58 insertions(+), 82 deletions(-) delete mode 100644 .changeset/big-laws-rhyme.md delete mode 100644 .changeset/breezy-planes-shop.md delete mode 100644 .changeset/eight-snails-hope.md delete mode 100644 .changeset/nasty-mice-check.md delete mode 100644 .changeset/new-maps-destroy.md delete mode 100644 .changeset/olive-pillows-bathe.md delete mode 100644 .changeset/quick-wasps-refuse.md delete mode 100644 .changeset/rare-pets-provide.md delete mode 100644 .changeset/spotty-meals-prove.md delete mode 100644 .changeset/yellow-penguins-clean.md diff --git a/.changeset/big-laws-rhyme.md b/.changeset/big-laws-rhyme.md deleted file mode 100644 index 8da672d..0000000 --- a/.changeset/big-laws-rhyme.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': minor ---- - -Improve handling of react - -Previously we relied on React being imported every time you wanted to use jsx (`import React from 'react';`). But with this change the jsx factory is injected when needed and you no longer have to import react. - -It also improves how the jsx factory is handled. Previously it used `React.createElement`. But now it instead using `createElement` from `'@wordpress/element'`. diff --git a/.changeset/breezy-planes-shop.md b/.changeset/breezy-planes-shop.md deleted file mode 100644 index 0243326..0000000 --- a/.changeset/breezy-planes-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': patch ---- - -Fix bug where css transforms are not applied diff --git a/.changeset/eight-snails-hope.md b/.changeset/eight-snails-hope.md deleted file mode 100644 index 53e5784..0000000 --- a/.changeset/eight-snails-hope.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': major ---- - -Require minimum node version 14 - -This was the requirement before as well, though it was not clearly stated. With this release it is more clearly stated that 14.8 is the least requirement. diff --git a/.changeset/nasty-mice-check.md b/.changeset/nasty-mice-check.md deleted file mode 100644 index 1d2f9c2..0000000 --- a/.changeset/nasty-mice-check.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': major ---- - -Rework cli output - -Previoulsy the cli output was rendered with `ink` and `react`. That was effective and made it easy to make an interactive cli. But I've realized that this is not an interactive cli. I want `wp-bundler` to stay out of your way. - -This rework means that the cli is no longer rendered with ink. Instead the output is regular `console.log`'s. This also has the benefit of working in non interactive cli environments as well. diff --git a/.changeset/new-maps-destroy.md b/.changeset/new-maps-destroy.md deleted file mode 100644 index 3671078..0000000 --- a/.changeset/new-maps-destroy.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': major ---- - -Introduce build & dev sub commands - -Previously `wp-bundler` worked as a single command, without nothing but flags as the arguments. - -But to cater for future improvements I've choosen to split the command into sub commands – for now `wp-bundler build` for production and `wp-bundler dev` for development. - -The old behaviour is still around, but is marked as deprecated and is not recommended for new projects. It will be removed in the next major release. diff --git a/.changeset/olive-pillows-bathe.md b/.changeset/olive-pillows-bathe.md deleted file mode 100644 index 3ef98f5..0000000 --- a/.changeset/olive-pillows-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': patch ---- - -Skip emitting confusing nomodule css diff --git a/.changeset/quick-wasps-refuse.md b/.changeset/quick-wasps-refuse.md deleted file mode 100644 index d588513..0000000 --- a/.changeset/quick-wasps-refuse.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': patch ---- - -Add improved examples - -This release also adds improved examples. The previous example ran in a custom environment without actually using WordPress. These new examples makes use of `@wordpress/env` to spin up a quick WordPress environment. diff --git a/.changeset/rare-pets-provide.md b/.changeset/rare-pets-provide.md deleted file mode 100644 index 41044db..0000000 --- a/.changeset/rare-pets-provide.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': patch ---- - -Bundle @wordpress/icons instead of adding it as dependency - -@wordpress/icons is treated as an internal packages and is not exposed on `window.wp` as the others. Instead this package should be bundled with the projects source. See #54 for context. diff --git a/.changeset/spotty-meals-prove.md b/.changeset/spotty-meals-prove.md deleted file mode 100644 index 4bd695e..0000000 --- a/.changeset/spotty-meals-prove.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': minor ---- - -Add support for plugins - -This builder wasn't supported by plugins before since the generated `AssetLoader` included some functions tied to specific themes. But with this relase the bundler also supports plugins. - -The only thing you need to do is pass root directory and url to the `AssetLoader::prepare` call in you main entry file: - -```php -require_once __DIR__ . '/dist/AssetLoader.php'; - -WPBundler\AssetLoader::prepare(\plugin_dir_path(__FILE__), \plugin_dir_url(__FILE__)); -WPBundler\AssetLoader::enqueueAssets('main'); -``` diff --git a/.changeset/yellow-penguins-clean.md b/.changeset/yellow-penguins-clean.md deleted file mode 100644 index 742c97b..0000000 --- a/.changeset/yellow-penguins-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@fransvilhelm/wp-bundler': patch ---- - -Surface errors outside esbuild pipeline diff --git a/CHANGELOG.md b/CHANGELOG.md index 72dd241..98ec706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,62 @@ # @fransvilhelm/wp-bundler +## 3.0.0 + +### Major Changes + +- Require minimum node version 14 (by [@adambrgmn](https://github.com/adambrgmn) in [#45](https://github.com/adambrgmn/wp-bundler/pull/45)) + + This was the requirement before as well, though it was not clearly stated. With this release it is more clearly stated that 14.8 is the least requirement. + +- Rework cli output (by [@adambrgmn](https://github.com/adambrgmn) in [#41](https://github.com/adambrgmn/wp-bundler/pull/41)) + + Previoulsy the cli output was rendered with `ink` and `react`. That was effective and made it easy to make an interactive cli. But I've realized that this is not an interactive cli. I want `wp-bundler` to stay out of your way. + + This rework means that the cli is no longer rendered with ink. Instead the output is regular `console.log`'s. This also has the benefit of working in non interactive cli environments as well. + +- Introduce build & dev sub commands (by [@adambrgmn](https://github.com/adambrgmn) in [#35](https://github.com/adambrgmn/wp-bundler/pull/35)) + + Previously `wp-bundler` worked as a single command, without nothing but flags as the arguments. + + But to cater for future improvements I've choosen to split the command into sub commands – for now `wp-bundler build` for production and `wp-bundler dev` for development. + + The old behaviour is still around, but is marked as deprecated and is not recommended for new projects. It will be removed in the next major release. + +### Minor Changes + +- Improve handling of react (by [@adambrgmn](https://github.com/adambrgmn) in [#56](https://github.com/adambrgmn/wp-bundler/pull/56)) + + Previously we relied on React being imported every time you wanted to use jsx (`import React from 'react';`). But with this change the jsx factory is injected when needed and you no longer have to import react. + + It also improves how the jsx factory is handled. Previously it used `React.createElement`. But now it instead using `createElement` from `'@wordpress/element'`. + +- Add support for plugins (by [@adambrgmn](https://github.com/adambrgmn) in [#48](https://github.com/adambrgmn/wp-bundler/pull/48)) + + This builder wasn't supported by plugins before since the generated `AssetLoader` included some functions tied to specific themes. But with this relase the bundler also supports plugins. + + The only thing you need to do is pass root directory and url to the `AssetLoader::prepare` call in you main entry file: + + ```php + require_once __DIR__ . '/dist/AssetLoader.php'; + + WPBundler\AssetLoader::prepare(\plugin_dir_path(__FILE__), \plugin_dir_url(__FILE__)); + WPBundler\AssetLoader::enqueueAssets('main'); + ``` + +### Patch Changes + +- Fix bug where css transforms are not applied (by [@adambrgmn](https://github.com/adambrgmn) in [#45](https://github.com/adambrgmn/wp-bundler/pull/45)) +- Skip emitting confusing nomodule css (by [@adambrgmn](https://github.com/adambrgmn) in [#46](https://github.com/adambrgmn/wp-bundler/pull/46)) +- Add improved examples (by [@adambrgmn](https://github.com/adambrgmn) in [#49](https://github.com/adambrgmn/wp-bundler/pull/49)) + + This release also adds improved examples. The previous example ran in a custom environment without actually using WordPress. These new examples makes use of `@wordpress/env` to spin up a quick WordPress environment. + +- Bundle @wordpress/icons instead of adding it as dependency (by [@adambrgmn](https://github.com/adambrgmn) in [#55](https://github.com/adambrgmn/wp-bundler/pull/55)) + + @wordpress/icons is treated as an internal packages and is not exposed on `window.wp` as the others. Instead this package should be bundled with the projects source. See #54 for context. + +- Surface errors outside esbuild pipeline (by [@adambrgmn](https://github.com/adambrgmn) in [#47](https://github.com/adambrgmn/wp-bundler/pull/47)) + ## 2.1.1 ### Patch Changes diff --git a/package.json b/package.json index 0092a72..e79b717 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fransvilhelm/wp-bundler", - "version": "2.1.1", + "version": "3.0.0", "description": "A fast bundler tailored for WordPress based on esbuild", "main": "dist/index.js", "repository": {