-
Notifications
You must be signed in to change notification settings - Fork 12
feat!: split functions package
#475
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
Conversation
pieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opted for the nested directory setup, where functions has both dev and prod as opposed to top-level functions and functions-dev directories, as a way to convey the relationship between the packages. I'm hoping that release-please will be okay with this setup, but I haven't actually tested.
If that works and we're okay with this setup, we can apply the same logic to the other packages.
I think it's doable to make release please happy, I just tried adjusting config on top of the current changes ( c9110e9 ) and run npx release-please release-pr --token="$(gh auth token)" --repo-url=netlify/primitives --dry-run --target-branch=feat/split-functions-release-please-test and it produced following:
dev: 5.0.0
5.0.0 (2025-10-13)
⚠ BREAKING CHANGES
- split
functionspackage
Features
- split
functionspackage (4a5d768)
Dependencies
- The following workspace dependencies were updated
- dependencies
- @netlify/functions bumped from 4.3.0 to 5.0.0
- dependencies
functions: 5.0.0
5.0.0 (2025-10-13)
⚠ BREAKING CHANGES
- split
functionspackage
Features
- split
functionspackage (4a5d768)
functions-dev: 5.0.0
5.0.0 (2025-10-13)
⚠ BREAKING CHANGES
- split
functionspackage
Features
- split
functionspackage (4a5d768)
Dependencies
- The following workspace dependencies were updated
- dependencies
- @netlify/functions bumped from 4.3.0 to 5.0.0
- dependencies
nuxt: 0.2.1
0.2.1 (2025-10-13)
Dependencies
- The following workspace dependencies were updated
- dependencies
- @netlify/dev bumped from ^4.6.0 to ^5.0.0
- dependencies
vite-plugin: 2.7.1
2.7.1 (2025-10-13)
Dependencies
- The following workspace dependencies were updated
- dependencies
- @netlify/dev bumped from 4.6.0 to 5.0.0
- dependencies
vite-plugin-tanstack-start: 1.1.1
1.1.1 (2025-10-13)
Dependencies
- The following workspace dependencies were updated
- dependencies
- @netlify/vite-plugin bumped from ^2.7.0 to ^2.7.1
- dependencies
This PR was generated with Release Please. See documentation.
only question is what the initial version of functions-dev package should be? We can skip putting any version in manifest and the it will produce 1.0.0 as initial version
Also note that I did have to bump last release sha in config, as otherwise functions-dev get bunch of outdated entries in changelog like so:
serhalp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely on board with this!
So good:
13 direct deps → 1 direct dep
311 transitive deps → 1 transitive dep
82 MB install size → 84 KB install size
Co-authored-by: Philippe Serhal <philippe.serhal@netlify.com>
Co-authored-by: Philippe Serhal <philippe.serhal@netlify.com>
Co-authored-by: Philippe Serhal <philippe.serhal@netlify.com>
Co-authored-by: Philippe Serhal <philippe.serhal@netlify.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@pieh do you mind committing this? |
Breaks up the
@netlify/functionsmodule into two:@netlify/functions: production runtime logic, published from thepackages/functions/proddirectory@netlify/functions-dev: local development emulation logic, published from thepackages/functions/devdirectoryI've opted for the nested directory setup, where
functionshas bothdevandprodas opposed to top-levelfunctionsandfunctions-devdirectories, as a way to convey the relationship between the packages. I'm hoping that release-please will be okay with this setup, but I haven't actually tested.If that works and we're okay with this setup, we can apply the same logic to the other packages.
Part of https://linear.app/netlify/issue/FRB-2012/separate-types-and-public-methods-from-internal-dependencies.
BREAKING CHANGE
The
/devexport, introduced in version 3.1.0, has been removed.The local development functionality has been extracted into a new
@netlify/functions-devpackage. If your application relies on that logic, you shouldnpm install @netlify/functions-devand update your import:No other changes are needed.