Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): add missing shared types #3212

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

userquin
Copy link
Collaborator

@userquin userquin commented Nov 9, 2024

πŸ”— Linked issue

resolves #3201

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Nuxt module builder generating module types in types dts (node and some runtime hooks types), we use it in the default package export, but internal types created in module dts, this PR just adds a new subpackage export ./types using module.d.mts with the types only and also including the subpackage inside typesVersions to include node10 consumers.
This PR includes:

  • add src/types.ts to the build config file to add shared types to the types dts
  • refactor CI workflow to build after stubbing to fix lint script
  • run build script after stubbing before running tests (to fix typecheck: tsc --noEmit)

This PR also changes the default subpackage export to use default instead import (ESM only).

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

pkg-pr-new bot commented Nov 9, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@nuxtjs/i18n@3212

commit: 3b066c4

@userquin
Copy link
Collaborator Author

userquin commented Nov 9, 2024

@userquin userquin changed the title fix(types): add types to subpackage exports using module dts fix(types): add missing shared types Nov 10, 2024
@userquin
Copy link
Collaborator Author

SB reproduction updated to use relative paths in nuxt config file (we cannot use nuxt aliases): registering also i18n.options.ts using relative path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LocaleObject type is no longer exported in v9
2 participants