Skip to content

chore: adopt nuxtseo-shared 5.3.4 APIs#310

Merged
harlan-zw merged 4 commits into
mainfrom
chore/nuxtseo-shared-5.3.4
Jul 22, 2026
Merged

chore: adopt nuxtseo-shared 5.3.4 APIs#310
harlan-zw merged 4 commits into
mainfrom
chore/nuxtseo-shared-5.3.4

Conversation

@harlan-zw

Copy link
Copy Markdown
Contributor

❓ Type of change

  • 🧹 Chore

📚 Description

Bumps nuxtseo-shared to ^5.3.4 and switches robots' server code onto its shared implementations instead of the local, drifted copies:

  • deleted src/runtime/server/kit.ts (a private copy of createNitroRouteRuleMatcher); getPathRobotConfig now imports it from nuxtseo-shared/server
  • runtime logger now built with createModuleLogger from nuxtseo-shared/utils, same tag and level behavior as before
  • build-time logger now built with useModuleLogger from nuxtseo-shared/kit, same tag and level behavior as before

One thing that needed extra work: nuxtseo-shared/server imports nitropack/runtime internally, and Nitro externalizes npm dependencies by default during server bundling. That means the shared route-rule matcher's nitropack/runtime import never gets Nitro's virtual storage-module rewrite, and it throws ERR_PACKAGE_IMPORT_NOT_DEFINED for #nitro-internal-virtual/storage at request time. Confirmed this by bisecting the e2e suite (22 suites failed with the swap, passed with the old local copy). Fixed by pushing nuxtseo-shared onto nitro.externals.inline in module.ts, which makes Nitro bundle it instead of leaving it external.

No public API changes. pnpm lint, pnpm typecheck, pnpm build, and pnpm test (43/43 files, 203/203 tests) all pass.

- bump nuxtseo-shared catalog entry to ^5.3.4
- swap local createNitroRouteRuleMatcher for nuxtseo-shared/server's
- swap runtime logger for nuxtseo-shared/utils createModuleLogger
- swap build-time logger for nuxtseo-shared/kit useModuleLogger
- inline nuxtseo-shared into the nitro server bundle so its
  nitropack/runtime import resolves through nitro's virtual storage
  module instead of being left external
@pkg-pr-new

pkg-pr-new Bot commented Jul 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxtjs/robots@310

commit: eb930c7

Adopts nuxtseo-shared 5.3.5's pure createNitroRouteRuleMatcher(runtimeConfig, e)
signature and drops the nitro.externals.inline workaround, which is no longer
needed now that nuxtseo-shared/server ships no nitropack/runtime import.
@harlan-zw

Copy link
Copy Markdown
Contributor Author

Reworked onto the pure createNitroRouteRuleMatcher(runtimeConfig, e) API from nuxtseo-shared (harlan-zw/nuxt-seo#594), dropping the nitro.externals.inline workaround. CI is expected red until nuxtseo-shared 5.3.5 is published — the catalog pins ^5.3.5 but the lockfile can't resolve it yet. Once 5.3.5 lands the lockfile will be refreshed and this goes green. Verified locally against a patched build.

nuxtseo-shared 5.3.5 makes createNitroRouteRuleMatcher a pure
(runtimeConfig) => matcher; robots already caches on nitroApp.
@harlan-zw
harlan-zw merged commit da52cb1 into main Jul 22, 2026
10 checks passed
@harlan-zw
harlan-zw deleted the chore/nuxtseo-shared-5.3.4 branch July 22, 2026 15:46
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.

1 participant