Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Chore: drop Node.js 8 support #294

Closed
erezrokah opened this issue Jan 11, 2021 · 7 comments · Fixed by #478
Closed

Chore: drop Node.js 8 support #294

erezrokah opened this issue Jan 11, 2021 · 7 comments · Fixed by #478
Assignees

Comments

@erezrokah
Copy link
Contributor

Following up with netlify/cli#1568, we should be good now with dropping Node.js 8 support for the zip-it-and-ship-it.

@ehmicky
Copy link
Contributor

ehmicky commented Jan 11, 2021

@netlify/build uses @netlify/zip-it-and-ship-it in production, so this depends on Node 8 support being dropped from @netlify/build first (https://github.com/netlify/team-dev/issues/2).

To be more precise, the core Functions plugin should always use Node 12 in production (as other core plugins), but Node 8 could still be used when all of the following apply:

  • a plugin is using the functions-utils list() and listAll() methods
  • that plugin is either local or was installed in package.json
  • the build is setting a custom Node.js version, and that version is Node 8

Maybe, that's too much of an edge case to worry. What do you think?

@erezrokah
Copy link
Contributor Author

erezrokah commented Jan 11, 2021

Thanks for clarifying, I was only thinking about the core plugin use case.

Maybe, that's too much of an edge case to worry. What do you think?

Probably better to be on the safe side unless we have an urgent reason to upgrade.

@erezrokah
Copy link
Contributor Author

Linking this branch for future reference.

@ehmicky
Copy link
Contributor

ehmicky commented May 14, 2021

Node 8 had to be dropped in all methods except list() and listAll() due to archiver@v4 not supporting Node 16, but archiver@v5 supporting Node 16 but not Node 8. See #463

@ehmicky
Copy link
Contributor

ehmicky commented May 17, 2021

After doing some research, I would suggest that we directly drop Node 8 support in the whole package (including list() and listAll()) due to the very minimal risk:

  • No npm package seems to require @netlify/functions-utils directly
  • The only plugin using @netlify/functions-utils is netlify-plugin-inline-functions-env. From Humio logs, it appears that no site using this plugin is both installing it in package.json and using Node 8
  • The risk of local plugins using utils.functions while using Node 8 seems minimal, although there is no available data about this

What are your thoughts?

Note: this would also moving the require('archiver') statement back to the top-level scope.

@eduardoboucas eduardoboucas self-assigned this May 17, 2021
@eduardoboucas
Copy link
Member

This sounds great, thanks for following up on this @ehmicky!

I've assigned this to myself, I'm happy to take it from here.

@ehmicky
Copy link
Contributor

ehmicky commented May 21, 2021

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

Successfully merging a pull request may close this issue.

3 participants