Alright, so we have finally landed support for HMR in experimental mode. Once you upgrade the @adonisjs/core and the @adonisjs/assembler packages to their latest releases, you can start using the HMR mode.
This is what you need to do.
npm i -D hot-hook @adonisjs/assembler@latest
npm i @adonisjs/core@latest
Next update the package.json file with the following configuration
Configure basic auth guard and export authFinder mixin from its own subpath
The @adonisjs/auth can be used with Lucid if someone creates a guard that does not use Lucid under the hood.
However, we were exporting the withAuthFinder mixin from the main entrypoint of the package and this mixin relies on Lucid. Therefore Lucid becomes a hard dependency of the Auth package.
After this release, we have moved the mixin to its own sub module and you can import it as follows.
- import { withAuthFinder } from '@adonisjs/auth'
+ import { withAuthFinder } from '@adonisjs/auth/mixins/lucid'
Commits
refactor: export Lucid mixins from its own subpath with descriptive name 15d3761
Merge pull request #243 from parker-codes/chore/add-basic-auth-guard c61ccb1
Merge pull request #239 from adonisjs/fix/hard-dependency d53cb84
chore: add Basic auth guard c58e683
fix(mixins): update deprecation status f8a5715
fix(mixins): ensure we do not lose type of withAuthFinder 96663d3
fix(mixins): rewrite broken imports 19d7042
fix(mixins): add mixins file to tsup entry e4df074
fix(mixins): remove withAuthFinder from root export 5d04dde
Display validation error summary in flash messages errorsBag
After this release, the session package will add the validation errors summary inside the errorsBag property of flash message. Therefore using the @errors tag will display a global error message for validation errors too.
Commits
feat: flash validation errors summary to errorsBag badda3f
After this release, assembler will integrate natively with the hot-hook npm package. When the hmr option is enabled, assembler will run the Dev server child process with the hot-hook loader and listen for the messages sent by the hot-hook loader.
Commits
test: fix flaky tests (9de19c6)
chore: update dependencies (56935db)
Merge pull request #77 from adonisjs/feat/hmr (4392202)
The DevServer class now accepts a new onHttpServerMessage hook that will be called when the HTTP child process sends a message to the parent process ( the assembler ).
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the minor-upgrades group with 21 updates:
6.7.2
6.7.3
6.3.1
6.7.0
7.1.0
7.2.0
3.0.1
3.0.2
3.1.1
3.1.2
1.4.8
1.4.14
20.11.28
20.12.7
10.0.1
10.0.3
5.4.2
5.4.5
5.1.6
5.2.8
9.1.1
9.2.0
20.4.0
20.5.1
7.1.1
7.4.0
2.0.2
2.0.3
2.0.2
2.0.3
6.0.1
6.0.2
0.2.1
0.2.2
7.2.3
7.5.0
3.0.0
3.0.1
18.2.66
18.2.78
18.2.22
18.2.25
Updates
@poppinss/utils
from 6.7.2 to 6.7.3Release notes
Sourced from
@poppinss/utils
's releases.Commits
50f881a
chore(release): 6.7.3117f2e2
chore: update dependenciesc3d46cb
chore: update dependenciesUpdates
@adonisjs/core
from 6.3.1 to 6.7.0Release notes
Sourced from
@adonisjs/core
's releases.... (truncated)
Commits
423820d
chore(release): 6.7.0e472091
Merge pull request #4504 from adonisjs/feat/hmrfbdae40
refactor: remove unused symbols4a9d201
chore: update dependencies9b2aadc
Merge branch 'develop' into feat/hmra511872
chore(release): 6.6.0323152d
chore: downgrade eslinta986b0c
refactor: upgrade@vinejs/vine
@2
cdc266a
refactor: move to--unstable-hmr
flag6c2bff9
test: add testUpdates
@adonisjs/http-server
from 7.1.0 to 7.2.0Release notes
Sourced from
@adonisjs/http-server
's releases.Commits
4cb4078
chore(release): 7.2.0bf4f0bb
fix: fix invalid types647d400
feat: add response.onFinish methodUpdates
@japa/expect
from 3.0.1 to 3.0.2Release notes
Sourced from
@japa/expect
's releases.Commits
3cbcb06
chore(release): 3.0.2478ad4b
chore: update dependenciesUpdates
@japa/runner
from 3.1.1 to 3.1.2Release notes
Sourced from
@japa/runner
's releases.Commits
9848c32
chore(release): 3.1.2bceba2f
chore: update dependenciesUpdates
@swc/core
from 1.4.8 to 1.4.14Changelog
Sourced from
@swc/core
's changelog.... (truncated)
Commits
b03669c
chore: Publish1.4.14
withswc_core
v0.90.31
59d18c3
chore: Bump cratesf6ba92b
fix(es/resolver): Correctly check strict mode (#8851)d4b89db
chore: Bump crates7a89e5d
fix(es/minifier): Handle switch cases (#8854)fcc82a5
chore: Bump cratesa7a32c4
fix(es/utils): Preserve optional chain effect (#8850)6bc4de6
chore: Bump crates62c4f5e
fix(es/plugin): Createtokio
runtime only if necessary (#8845)187ceb1
chore: Format helpersUpdates
@types/node
from 20.11.28 to 20.12.7Commits
Updates
np
from 10.0.1 to 10.0.3Release notes
Sourced from np's releases.
Commits
ad1a980
10.0.302f60c7
Fix publish OTP for Yarn Berry (#741)af1a048
10.0.2770418f
Use npm for tagging versions when pnpm is the chosen package manager (#739)Updates
typescript
from 5.4.2 to 5.4.5Release notes
Sourced from typescript's releases.
Commits
27bcd4c
Update LKG9f33bf1
🤖 Pick PR #58098 (Fix constraints of nested homomorph...) into release-5.4 (#...71b2f84
Bump version to 5.4.5 and LKG892936f
🤖 Pick PR #58083 (Don't propagate partial union/inter...) into release-5.4 (#...38a7c05
release-5.4: Always set node-version for setup-node (#58117)b754fc3
🤖 Pick PR #57778 (fix type import check for default-i...) into release-5.4 (#...8eb3367
Bump version to 5.4.4 and LKGde9096b
🤖 Pick PR #57871 (Divide-and-conquer strategy for int...) into release-5.4 (#...06aae98
🤖 Pick PR #57973 (Compare package.json paths with cor...) into release-5.4 (#...6d8134e
🤖 Pick PR #57637 (Fixed a regression related to deter...) into release-5.4 (#...Updates
vite
from 5.1.6 to 5.2.8Release notes
Sourced from vite's releases.
Changelog
Sourced from vite's changelog.
... (truncated)
Commits
8b8d402
release: v5.2.8646319c
fix: do not access document in/@vite/client
when not defined (#16318)445c4f2
fix: fix sourcemap when using object asdefine
value (#15805)a78e265
chore(deps): update all non-major dependencies (#16325)4581e83
refactor: use types from sass instead of@types/sass
(#16340)3c85c6b
fix: csp nonce injection when no closing tag (#16281) (#16282)21cc10b
fix(hmr): multiple updates happened when invalidate is called while multiple ...01af308
fix(css): unknown file error happened with lightningcss (#16306)eca68fa
fix(scanner): duplicate modules for same id if glob is used in html-like type...ad246da
release: v5.2.7Updates
@adonisjs/auth
from 9.1.1 to 9.2.0Release notes
Sourced from
@adonisjs/auth
's releases.Commits
014a6dd
chore(release): 9.2.015d3761
refactor: export Lucid mixins from its own subpath with descriptive namec61ccb1
Merge pull request #243 from parker-codes/chore/add-basic-auth-guardd53cb84
Merge pull request #239 from adonisjs/fix/hard-dependencyc58e683
chore: add Basic auth guardf8a5715
fix(mixins): update deprecation status96663d3
fix(mixins): ensure we do not lose type of withAuthFinder19d7042
fix(mixins): rewrite broken importse4df074
fix(mixins): add mixins file to tsup entry5d04dde
fix(mixins): remove withAuthFinder from root exportUpdates
@adonisjs/lucid
from 20.4.0 to 20.5.1Release notes
Sourced from
@adonisjs/lucid
's releases.Commits
5002dc9
chore(release): 20.5.1e96f5fa
chore(release): 20.5.0059c472
feat(base_model): add clause variant to findBy method (#1020)c22f019
fix(base_model): correct typing for findManyBy196c97c
Merge pull request #1013 from MaximeMRF/feat-step-option-migrator4012129
feat(Migrator): add step optionUpdates
@adonisjs/session
from 7.1.1 to 7.4.0Release notes
Sourced from
@adonisjs/session
's releases.Commits
40242c6
chore(release): 7.4.0b743db5
fix: call super1d85cee
feat: make session class macroable51d5e22
feat: export ValuesStore, Session and ReadOnlyValuesStore classesfd7987f
chore: update peer dependenciesfb6289f
chore: update dependencies10a04b6
feat: export ValuesStore, Session and ReadOnlyValuesStore classes47c14f9
chore(release): 7.3.0badda3f
feat: flash validation errors summary to errorsBaga47763a
chore(release): 7.2.0Updates
@japa/api-client
from 2.0.2 to 2.0.3Release notes
Sourced from
@japa/api-client
's releases.Commits
9e2e87b
chore(release): 2.0.315bd2db
chore: update dependencies015d2df
chore(release): 2.0.2Updates
@japa/browser-client
from 2.0.2 to 2.0.3Release notes
Sourced from
@japa/browser-client
's releases.Commits
f15fbce
chore(release): 2.0.36009f22
chore: update dependenciesUpdates
edge.js
from 6.0.1 to 6.0.2Release notes
Sourced from edge.js's releases.
Commits
c7fa431
chore(release): 6.0.281fd898
chore(package): update dependencies5adb9d4
chore: update dependenciesUpdates
reflect-metadata
from 0.2.1 to 0.2.2Commits
Updates
@adonisjs/assembler
from 7.2.3 to 7.5.0Release notes
Sourced from
@adonisjs/assembler
's releases.Commits
4da3fc7
chore(release): 7.5.09de19c6
test: fix flaky tests56935db
chore: update dependencies4392202
Merge pull request #77 from adonisjs/feat/hmr57781e4
feat: hmre53086a
chore(release): 7.4.0e9d78ee
fix: windows flakky test516a1fb
feat: add onHttpServerMessage hookf77bca3
chore(release): 7.3.0b573ce2
chore: migrate to release-itUpdates
@japa/plugin-adonisjs
from 3.0.0 to 3.0.1Release notes
Sourced from
@japa/plugin-adonisjs
's releases.Commits
e58dcdd
chore(release): 3.0.106e3c29
chore: update dependenciesUpdates
@types/react
from 18.2.66 to 18.2.78Commits
Updates
@types/react-dom
from 18.2.22 to 18.2.25Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show