diff --git a/.changeset/cuddly-ducks-reply.md b/.changeset/cuddly-ducks-reply.md deleted file mode 100644 index ff68b3d00..000000000 --- a/.changeset/cuddly-ducks-reply.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@preact/async-loader': major -'preact-cli': major ---- - -Drops support for Preact v8 diff --git a/.changeset/cyan-tomatoes-count.md b/.changeset/cyan-tomatoes-count.md deleted file mode 100644 index 5a82bcac3..000000000 --- a/.changeset/cyan-tomatoes-count.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'preact-cli': major ---- - -Alters CSS Module detection to instead rely upon file names, rather than directory names. - -Treating all CSS files found within `routes/` and `components/` as CSS Modules was not obvious, nor did it offer an easy way to opt out (or in) without editing the Webpack config itself. - -This change makes is so that users can opt into CSS Modules from anywhere in their app by instead naming their CSS files according to the pattern `*.module.css`. - -Anyone using CSS Modules within `routes/` or `components/` will need to alter their CSS files to be `x.module.css`. If you've disabled CSS Modules in your `preact.config.js`, you can remove that bit of configuration and use file names to instead determine behavior. diff --git a/.changeset/great-dryers-cross.md b/.changeset/great-dryers-cross.md deleted file mode 100644 index aeda7e193..000000000 --- a/.changeset/great-dryers-cross.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'preact-cli': major ---- - -Reduces the `env` parameter of `preact.config.js` to only contain 3 values: `isProd`, `isWatch`, and `isServer`. - -Previously, `env` contained many semi-duplicated values (`production` and `isProd`, etc) as well as values that were unlikely to be of much use to many users (what flags were set, for instance). Because of this, the signal-to-noise ratio was rather low which we didn't like. As such, we reduced `env` down to the most basic environment info: what type of build is `preact-cli` doing and for which environement? - -If you customize your Webpack config using a `preact.config.js`, please be aware that you may need to update which values you consume from `env`. diff --git a/.changeset/hungry-peas-look.md b/.changeset/hungry-peas-look.md deleted file mode 100644 index 6580e5585..000000000 --- a/.changeset/hungry-peas-look.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'preact-cli': major ---- - -To increase transparency and user control over the `template.html`, `<% preact.headEnd %>` and `<% preact.bodyEnd %>` will no longer be supported; instead, users should directly adopt the EJS and keep it in their templates. - -In the past, these were abstracted away as they were a bit unwieldy; EJS might be unfamiliar with users and the way data was retrieved from `html-webpack-plugin` was somewhat less than elegant. However, this has much improved over the years and the abstraction only makes simple edits less than obvious, so it is no longer fulfilling it's purpose. - -New projects will have a `template.ejs` created in place of the old `template.html`, containing the full EJS template. For existing projects, you can copy [the default `template.ejs`](https://github.com/preactjs/preact-cli/blob/master/packages/cli/src/resources/template.ejs) into your project or adapt it as you wish. diff --git a/.changeset/lucky-lizards-drive.md b/.changeset/lucky-lizards-drive.md deleted file mode 100644 index 331225065..000000000 --- a/.changeset/lucky-lizards-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'preact-cli': major ---- - -HMR / the `--refresh` flag is now enabled by default in dev mode. diff --git a/.changeset/metal-roses-flash.md b/.changeset/metal-roses-flash.md deleted file mode 100644 index 109c218b0..000000000 --- a/.changeset/metal-roses-flash.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'preact-cli': major ---- - -Changes the JSX transform from 'classic' to the newer 'automatic' - -Users will no longer need to add `import { h } from 'preact'` in their components; it will be done automatically for them. diff --git a/.changeset/poor-sloths-mate.md b/.changeset/poor-sloths-mate.md deleted file mode 100644 index e638a42be..000000000 --- a/.changeset/poor-sloths-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'preact-cli': major ---- - -Removes `--preload` flag and functionality from build command. diff --git a/.changeset/popular-zebras-yell.md b/.changeset/popular-zebras-yell.md deleted file mode 100644 index a6d2df930..000000000 --- a/.changeset/popular-zebras-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'preact-cli': patch ---- - -Disables hash in CSS file names for the SSR build diff --git a/.changeset/quiet-eels-fix.md b/.changeset/quiet-eels-fix.md deleted file mode 100644 index 335af1304..000000000 --- a/.changeset/quiet-eels-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'preact-cli': major ---- - -Removes `--json` & `--brotli` flags from `preact build`. Also removes `--rhl` alias for `--refresh` from `preact watch`. diff --git a/.changeset/rude-walls-dress.md b/.changeset/rude-walls-dress.md deleted file mode 100644 index d6d0f64fe..000000000 --- a/.changeset/rude-walls-dress.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'preact-cli': major -'@preact/prerender-data-provider': major ---- - -Updates to use html-webpack-plugin v4 diff --git a/.changeset/sweet-snakes-cheat.md b/.changeset/sweet-snakes-cheat.md deleted file mode 100644 index 4f87f1b9e..000000000 --- a/.changeset/sweet-snakes-cheat.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'preact-cli': major ---- - -- Upgrades to Webpack v5 - - Any custom configuration you do in your `preact.config.js` may need to be altered to account for this. Plugins may need replacements or different option formats. - -- `--esm` flag has been removed - - Dual output is now enabled by default in production builds. - -- `.babelrc` no longer overwrites matching keys - - Instead, the config will be merged in to the default. The default still takes precedence when there are conflicts, so you will still need to use your `preact.config.js` if you want to edit or remove default plugins or presets. diff --git a/.changeset/tender-lamps-boil.md b/.changeset/tender-lamps-boil.md deleted file mode 100644 index 4e33286c2..000000000 --- a/.changeset/tender-lamps-boil.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'preact-cli': major ---- - -Minimum supported Node version for `preact-cli` is now v14.14.0. Please upgrade if you are on an older version. - -`build` and `watch` commands will no longer take an optional `src` directory argument; if you want to change the source directory from the default (`./src`), please instead use the `--src` flag (i.e., `--src differentSrc`). - -Upon rebuild, the output directory will no longer be outright deleted; instead, it will be emptied. This has the benefit of better supporting containerized environments where specific directories are mounted. Emptying the directory, rather than deleting and recreating it, ensures a stable reference for those tools. diff --git a/.changeset/tiny-garlics-argue.md b/.changeset/tiny-garlics-argue.md deleted file mode 100644 index 4a11690db..000000000 --- a/.changeset/tiny-garlics-argue.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'preact-cli': major -'create-preact-cli': major ---- - -Extracts project creation functionality from `preact-cli` into `create-preact-cli` - -Setting up new `preact-cli` projects with `npx` is slow, as all dependencies of `preact-cli` would need to be installed, even though only a handful are used for project initialization. On the other hand, suggesting global installs is less than attractive due to NPM's poor default install location (requires `sudo`) and this can get out of sync over time. - -By extracting project initialization into its own package, we can provide much, much faster project setup times. - -To setup a new project, users will use `npm init preact-cli ...` or `yarn create preact-cli ...`. - -Additionally, the `--yarn` flag has been removed in favour of using the yarn initializer (`yarn create`). diff --git a/packages/async-loader/CHANGELOG.md b/packages/async-loader/CHANGELOG.md index 77679be93..46b77743e 100644 --- a/packages/async-loader/CHANGELOG.md +++ b/packages/async-loader/CHANGELOG.md @@ -1,5 +1,11 @@ # @preact/async-loader +## 4.0.0 + +### Major Changes + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Drops support for Preact v8 + ## 3.0.2 ### Patch Changes diff --git a/packages/async-loader/package.json b/packages/async-loader/package.json index 2c370a10f..9fdd110b6 100644 --- a/packages/async-loader/package.json +++ b/packages/async-loader/package.json @@ -1,6 +1,6 @@ { "name": "@preact/async-loader", - "version": "3.0.2", + "version": "4.0.0", "description": "Preact's async component loader for Webpack", "homepage": "https://github.com/preactjs/preact-cli", "bugs": "https://github.com/preactjs/preact-cli/issues", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 7d0463f87..6d383cfeb 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,77 @@ # preact-cli +## 4.0.0 + +### Major Changes + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Drops support for Preact v8 + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Alters CSS Module detection to instead rely upon file names, rather than directory names. + + Treating all CSS files found within `routes/` and `components/` as CSS Modules was not obvious, nor did it offer an easy way to opt out (or in) without editing the Webpack config itself. + + This change makes is so that users can opt into CSS Modules from anywhere in their app by instead naming their CSS files according to the pattern `*.module.css`. + + Anyone using CSS Modules within `routes/` or `components/` will need to alter their CSS files to be `x.module.css`. If you've disabled CSS Modules in your `preact.config.js`, you can remove that bit of configuration and use file names to instead determine behavior. + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Reduces the `env` parameter of `preact.config.js` to only contain 3 values: `isProd`, `isWatch`, and `isServer`. + + Previously, `env` contained many semi-duplicated values (`production` and `isProd`, etc) as well as values that were unlikely to be of much use to many users (what flags were set, for instance). Because of this, the signal-to-noise ratio was rather low which we didn't like. As such, we reduced `env` down to the most basic environment info: what type of build is `preact-cli` doing and for which environement? + + If you customize your Webpack config using a `preact.config.js`, please be aware that you may need to update which values you consume from `env`. + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - To increase transparency and user control over the `template.html`, `<% preact.headEnd %>` and `<% preact.bodyEnd %>` will no longer be supported; instead, users should directly adopt the EJS and keep it in their templates. + + In the past, these were abstracted away as they were a bit unwieldy; EJS might be unfamiliar with users and the way data was retrieved from `html-webpack-plugin` was somewhat less than elegant. However, this has much improved over the years and the abstraction only makes simple edits less than obvious, so it is no longer fulfilling it's purpose. + + New projects will have a `template.ejs` created in place of the old `template.html`, containing the full EJS template. For existing projects, you can copy [the default `template.ejs`](https://github.com/preactjs/preact-cli/blob/master/packages/cli/src/resources/template.ejs) into your project or adapt it as you wish. + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - HMR / the `--refresh` flag is now enabled by default in dev mode. + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Changes the JSX transform from 'classic' to the newer 'automatic' + + Users will no longer need to add `import { h } from 'preact'` in their components; it will be done automatically for them. + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Removes `--preload` flag and functionality from build command. + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Removes `--json` & `--brotli` flags from `preact build`. Also removes `--rhl` alias for `--refresh` from `preact watch`. + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Updates to use html-webpack-plugin v4 + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - - Upgrades to Webpack v5 + + - Any custom configuration you do in your `preact.config.js` may need to be altered to account for this. Plugins may need replacements or different option formats. + + - `--esm` flag has been removed + + - Dual output is now enabled by default in production builds. + + - `.babelrc` no longer overwrites matching keys + - Instead, the config will be merged in to the default. The default still takes precedence when there are conflicts, so you will still need to use your `preact.config.js` if you want to edit or remove default plugins or presets. + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Minimum supported Node version for `preact-cli` is now v14.14.0. Please upgrade if you are on an older version. + + `build` and `watch` commands will no longer take an optional `src` directory argument; if you want to change the source directory from the default (`./src`), please instead use the `--src` flag (i.e., `--src differentSrc`). + + Upon rebuild, the output directory will no longer be outright deleted; instead, it will be emptied. This has the benefit of better supporting containerized environments where specific directories are mounted. Emptying the directory, rather than deleting and recreating it, ensures a stable reference for those tools. + +* [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Extracts project creation functionality from `preact-cli` into `create-preact-cli` + + Setting up new `preact-cli` projects with `npx` is slow, as all dependencies of `preact-cli` would need to be installed, even though only a handful are used for project initialization. On the other hand, suggesting global installs is less than attractive due to NPM's poor default install location (requires `sudo`) and this can get out of sync over time. + + By extracting project initialization into its own package, we can provide much, much faster project setup times. + + To setup a new project, users will use `npm init preact-cli ...` or `yarn create preact-cli ...`. + + Additionally, the `--yarn` flag has been removed in favour of using the yarn initializer (`yarn create`). + +### Patch Changes + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Disables hash in CSS file names for the SSR build + +- Updated dependencies [[`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606)]: + - @preact/async-loader@4.0.0 + ## 3.5.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 3a2f6a2d5..0cec3dda0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "preact-cli", - "version": "4.0.0-next.2", + "version": "4.0.0", "description": "Start building a Preact Progressive Web App in seconds.", "keywords": [ "preact", @@ -38,7 +38,7 @@ "@babel/plugin-transform-react-jsx": "^7.13.12", "@babel/preset-env": "^7.13.15", "@babel/preset-typescript": "^7.13.0", - "@preact/async-loader": "^3.0.2", + "@preact/async-loader": "^4.0.0", "@prefresh/babel-plugin": "^0.4.1", "@prefresh/webpack": "^3.2.2", "autoprefixer": "^10.4.7", diff --git a/packages/create-cli/CHANGELOG.md b/packages/create-cli/CHANGELOG.md new file mode 100644 index 000000000..ce99e36bf --- /dev/null +++ b/packages/create-cli/CHANGELOG.md @@ -0,0 +1,15 @@ +# create-preact-cli + +## 1.0.0 + +### Major Changes + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Extracts project creation functionality from `preact-cli` into `create-preact-cli` + + Setting up new `preact-cli` projects with `npx` is slow, as all dependencies of `preact-cli` would need to be installed, even though only a handful are used for project initialization. On the other hand, suggesting global installs is less than attractive due to NPM's poor default install location (requires `sudo`) and this can get out of sync over time. + + By extracting project initialization into its own package, we can provide much, much faster project setup times. + + To setup a new project, users will use `npm init preact-cli ...` or `yarn create preact-cli ...`. + + Additionally, the `--yarn` flag has been removed in favour of using the yarn initializer (`yarn create`). diff --git a/packages/create-cli/package.json b/packages/create-cli/package.json index 07eb2b0ea..de761da51 100644 --- a/packages/create-cli/package.json +++ b/packages/create-cli/package.json @@ -1,6 +1,6 @@ { "name": "create-preact-cli", - "version": "0.1.0", + "version": "1.0.0", "description": "Start building a Preact Progressive Web App in seconds.", "keywords": [ "preact", diff --git a/packages/prerender-data-provider/CHANGELOG.md b/packages/prerender-data-provider/CHANGELOG.md new file mode 100644 index 000000000..140f22438 --- /dev/null +++ b/packages/prerender-data-provider/CHANGELOG.md @@ -0,0 +1,7 @@ +# @preact/prerender-data-provider + +## 4.0.0 + +### Major Changes + +- [#1647](https://github.com/preactjs/preact-cli/pull/1647) [`03b8f9d`](https://github.com/preactjs/preact-cli/commit/03b8f9d893e3a7351d5a5dfab126040f06f1c606) Thanks [@rschristian](https://github.com/rschristian)! - Updates to use html-webpack-plugin v4 diff --git a/packages/prerender-data-provider/package.json b/packages/prerender-data-provider/package.json index 61ec4f430..18a58e34e 100644 --- a/packages/prerender-data-provider/package.json +++ b/packages/prerender-data-provider/package.json @@ -1,6 +1,6 @@ { "name": "@preact/prerender-data-provider", - "version": "3.0.1", + "version": "4.0.0", "description": "Prerender data provider for preact-cli apps", "keywords": [ "preact",