Skip to content

feat: parseAsTuple#1036

Draft
I-3B wants to merge 1 commit into
47ng:nextfrom
I-3B:feat/parseAsTuple
Draft

feat: parseAsTuple#1036
I-3B wants to merge 1 commit into
47ng:nextfrom
I-3B:feat/parseAsTuple

Conversation

@I-3B

@I-3B I-3B commented Jul 4, 2025

Copy link
Copy Markdown
Contributor

closes #1022

@vercel

vercel Bot commented Jul 4, 2025

Copy link
Copy Markdown

@I-3B is attempting to deploy a commit to the 47ng Team on Vercel.

A member of the Team first needs to authorize it.

@I-3B I-3B force-pushed the feat/parseAsTuple branch from bf77c6c to 75ec4db Compare July 4, 2025 21:24
@I-3B

I-3B commented Jul 4, 2025

Copy link
Copy Markdown
Contributor Author

@franky47 can you please check the interface design? if it looks good I'll proceed with tests.

@franky47 franky47 added this to the 🪵 Backlog milestone Jul 9, 2025
@franky47 franky47 added the parsers/built-in Related to built-in parsers label Jul 9, 2025
@franky47

Copy link
Copy Markdown
Member

The overall design looks good, but we're blowing up the size limit budget. I need to do some shrinking of the bundle size before we can add any more features in the package (ideally I'd like to keep it under 5kB but that might be tricky to maintain).

@I-3B

I-3B commented Jul 10, 2025

Copy link
Copy Markdown
Contributor Author

The overall design looks good, but we're blowing up the size limit budget. I need to do some shrinking of the bundle size before we can add any more features in the package (ideally I'd like to keep it under 5kB but that might be tricky to maintain).

I see
Anything I can do from my side for now?

@franky47

franky47 commented Sep 3, 2025

Copy link
Copy Markdown
Member

Hey, coming back to this PR, I'm considering adding support in the nuqs docs for the shadcn CLI, to install custom parsers with a one-line command.

Would you mind if we moved this parser to the community section, and have it installable this way?

I'd like to keep the core bundle size small, and this could be one way.

@I-3B

I-3B commented Sep 3, 2025

Copy link
Copy Markdown
Contributor Author

Hey, coming back to this PR, I'm considering adding support in the nuqs docs for the shadcn CLI, to install custom parsers with a one-line command.

Would you mind if we moved this parser to the community section, and have it installable this way?

I'd like to keep the core bundle size small, and this could be one way.

of course, would you like me to assist with that?

@franky47

franky47 commented Sep 3, 2025

Copy link
Copy Markdown
Member

That would be great, thanks!

I haven't looked too deep into the CLI docs yet, but I saw Shadcn released a v3 that includes namespaces. From what I understand it could give us nice install commands like:

$ npx shadcn add @nuqs/parsers/parseAsTuple
# or even shorter (at the risk of feature mixup):
$ npx shadcn add @nuqs/parseAsTuple

However it would require declaring that namespace and point it to our registry in the components.json config, so that's an extra step.

We could go for plain URLs too:

$ npx shadcn add https://nuqs.47ng.com/parsers/parseAsTuple

What do you think?

@I-3B

I-3B commented Sep 3, 2025

Copy link
Copy Markdown
Contributor Author

the first command looks nicer for sure, but i don't think there's a real UX difference, as users will most likely copy-paste it from docs either ways

so i think it just depends on how much of a pain it's to maintain the registry (which i'm not knowledgeable enough about)

@franky47

franky47 commented Sep 3, 2025

Copy link
Copy Markdown
Member

the first command looks nicer for sure, but i don't think there's a real UX difference, as users will most likely copy-paste it from docs either ways

Yeah I'd expect a single copy-paste to be enough to get started, but if you need to declare the registry first, that's an extra step that might defeat the purpose of using this CLI. TBC.

@I-3B

I-3B commented Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

Yeah I'd expect a single copy-paste to be enough to get started, but if you need to declare the registry first, that's an extra step that might defeat the purpose of using this CLI. TBC.

okay, but how would it work, let's say user executes this:

npx shadcn add https://nuqs.47ng.com/parsers/parseAsTuple

would this add a components/nuqs/parseAsTuple.ts file that people can import into their project directly?
or should follow a different structure

@franky47

franky47 commented Sep 7, 2025

Copy link
Copy Markdown
Member

We can now have trusted namespaced registries, see #1118.

This is one of the reasons I migrated to nuqs.dev this weekend, so we can have a nice URL as a base.

@I-3B

I-3B commented Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

I think this PR will be on hold till the registry is setup and merged? as this will need:

  • to be moved out of nuqs package to where the registry package (?).
  • add it to registry.json

@franky47 franky47 mentioned this pull request Oct 20, 2025
1 task
I-3B added a commit to I-3B/nuqs that referenced this pull request Oct 25, 2025
@I-3B I-3B mentioned this pull request Oct 25, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parsers/built-in Related to built-in parsers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parseAsTuple

2 participants