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

Sunsetting Node 14 and 16 support #847

Open
wopian opened this issue Apr 19, 2023 · 5 comments · May be fixed by #818
Open

Sunsetting Node 14 and 16 support #847

wopian opened this issue Apr 19, 2023 · 5 comments · May be fixed by #818

Comments

@wopian
Copy link
Owner

wopian commented Apr 19, 2023

Guaranteed Node 14 and 16 support with be removed once the TypeScript rewrite has been completed in #818 as the following Node versions become EOL in 2023:

Applications that are stuck on using Node 14 will likely continue to function as normal as I don't think there has been any major language features added in Node 16+/modern browsers that are in use by our code that is potentially being polyfilled for compatibility purposes by Babel.

@wopian wopian pinned this issue Apr 19, 2023
@wopian wopian linked a pull request Apr 19, 2023 that will close this issue
21 tasks
@wopian wopian changed the title Sunsetting Node 14 support Sunsetting Node 14 and 16 support Oct 26, 2023
@wopian
Copy link
Owner Author

wopian commented Oct 26, 2023

Due to the timeframe the TypeScript rewrite has taken, Node 16 will also be sunset with it, as it became EOL this month (Oct 2023)

#818

@pedep feel free to assist migrating functionality over if you have time. My availability has been slim between work, Zeepkist and my photography work over the past several months 😿

@pedep
Copy link
Contributor

pedep commented Nov 2, 2023

@wopian i have begun refactoring parts of kitsu-core in #930 . Please let me know if you see anything you would like changed.

@pedep
Copy link
Contributor

pedep commented Nov 7, 2023

@wopian any thoughts on removing axios as a direct dependency of kitsu, in favor of using native fetch?
Since we are sunsetting node < 18, we can use fetch native both client and servers-side.

I would suggest moving an axios implementation to a separate package kitsu-axios for everyone with axios specifics in their codebase, such as middleware.

import { Kitsu } from 'kitsu'
import { AxiosAdapter } from 'kitsu-axios'

const api = new Kitsu({adapter: new AxiosAdapter()})

// or

Kitsu.default_adapter = AxiosAdapter;
const api = new Kitsu()

Another option is to add the kitsu-axios package as a dependency of kitsu and set it as the default. Then we can swap the defaults and remove the direct dependency in a later version. This way the current axios implementation sticks around until everyone has had a chance to migrate to fetch, or add a direct dependency on kitsu-axios to continue using axios

import { Kitsu, FetchAdapter } from 'kitsu'

const api = new Kitsu({adapter: new FetchAdapter()})

@wopian
Copy link
Owner Author

wopian commented Nov 12, 2023

@pedep yes, ^11 would be a good opportunity to finally get rid of Axios.

The kitsu package is relatively basic so I don't think we'd need to worry about implementing an adapter - it's only a few lines of code outside of all the JSDoc comments, so duplicating that in a seperate package for Axios wouldn't be too non-DRY.

kitsu could be soley native fetch from ^11 onwards and kitsu-axios would be an identical implementation with Axios ^1.x instead. So your upgrade paths from kitsu@9 and kitsu@10 (both Axios ^0.x) are either native Fetch or Axios ^1

@wopian
Copy link
Owner Author

wopian commented Apr 20, 2024

Eslint v9 dev dependency drops support for Node 16, so this package will be pinned to v8 until Kitsu v11

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

Successfully merging a pull request may close this issue.

2 participants