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

Deprecating fastify-* modules #3733

Closed
12 tasks done
jsumners opened this issue Feb 26, 2022 · 86 comments
Closed
12 tasks done

Deprecating fastify-* modules #3733

jsumners opened this issue Feb 26, 2022 · 86 comments
Milestone

Comments

@jsumners
Copy link
Member

jsumners commented Feb 26, 2022

2022-05-07 remaining work:

The following list is hoisted from comment #3733 (comment)


Original post:

Issue

If we are going to deprecate fastify-* modules, as outlined in #3482 (comment), then I really need help with https://github.com/fastify/deprecate-modules.

To start, I need help auditing https://github.com/fastify/deprecate-modules/blob/a7a87b05d129e04d7e36bd4f0eb07d479e2d7b6f/lib/modules.json to determine:

  1. Is the list of modules correct
  2. Are the versions correct? versionToPublish will be the new fastify-* version for the module. The newModule.version will be the version published under @fastify/*.

Subsequent to that, I need help with the todo list in the readme. In particular, is there anything that needs to be done for TypeScript in the deprecated modules (look at the templates)? How should the templates be updated for ESM exports?

Once we have the deprecation portions written and tested, we need to work on adding script for:

  1. Updating GitHub repository information (rename the repo, update links in package.json, etc)
  2. Patching the package.json with the new name and version for the new @fastify/* packages

attn: @fastify/core

@jsumners jsumners added this to the v4.0.0 milestone Feb 26, 2022
@zekth
Copy link
Member

zekth commented Feb 26, 2022

Could we make a checklist for each package like:

fastify-cors:

  • Fastify 4 compliant
  • Upgrade version OK
  • Template compliant. (doc / typescript )

@jsumners
Copy link
Member Author

Please do.

@darkgl0w
Copy link
Member

darkgl0w commented Feb 26, 2022

I am looking at modules.json list and so far :

  • there is one missing package that I will add via a PR (e.g.: aws-lambda-fastify renamed to @fastify/aws-lambda or something better), that part is trivial. EDIT: should it be added to this list 🤔 ?
  • there are some special cases (like fastify-csrf that will collide with already existing packages as we have another package published as @fastify/csrf), IMO these packages will require a manual intervention
  • after navigating through all the org repos, there seems to be some repo that needs to be archived :p

@zekth
Copy link
Member

zekth commented Feb 26, 2022

Project has been created: https://github.com/fastify/deprecate-modules/projects/1

@mcollina
Copy link
Member

@zekth we will be changing name and bumping major and then migrate to fastify v4 and bump major again.

@zekth
Copy link
Member

zekth commented Feb 27, 2022

@zekth we will be changing name and bumping major and then migrate to fastify v4 and bump major again.

Right now we're doing straight deprecation and work with the compatibility and compliancy afterward so?

@mcollina
Copy link
Member

yes exactly

@jsumners
Copy link
Member Author

As currently written:

  {
    "name": "fastify-cookie",
    "versionToPublish": "5.7.0",
    "license": "MIT",
    "newModule": {
      "name": "@fastify/cookie",
      "version": "6.0.0"
    }
  },

The following would happen:

  1. A new fastify-cookie package would be published at version 5.7.0 (up from 5.6.0). This package will wrap the exports of 5.6.0 with a deprecation notice.
  2. A new @fastify/cookie package would be published at version 6.0.0. This package will have the same code as 5.6.0.

Any subsequent changes to comply with fastify@4 would bump @fastify/cookie to 7.0.0.

This is the correct plan, yes?

@mcollina
Copy link
Member

amazing!

@yaneony
Copy link

yaneony commented Mar 21, 2022

What about "point-of-view" plugin? Maybe it makes sense to rename it as @fastify/views ?

@jsumners
Copy link
Member Author

What about "point-of-view" plugin? Maybe it makes sense to rename it as @fastify/views ?

This one does get skipped by the automated tool. I don't really have an opinion about moving it under the org scope. It's already named independently, and thus does not cause confusion around whether or not it is a community plugin or an org plugin.

@yaneony
Copy link

yaneony commented Mar 21, 2022

But isn't "point-of-view" one of org plugins?

@jsumners
Copy link
Member Author

But isn't "point-of-view" one of org plugins?

Yes.

@yaneony
Copy link

yaneony commented Mar 21, 2022

But then, it makes sense to move it to org plugins as well. As of mine sight of view. Right now this plugin looks "out of scope" and not fastify related. Moving it to @fastify/views or @fastify/pov will make it look more fastify related.

Just only my 2 cents :D

@fox1t
Copy link
Member

fox1t commented Mar 23, 2022

I like this plan! 👏

Speaking of point-of-view I vote for @fastify/point-of-view and it can follow the same upgrade path as others.

@mcollina
Copy link
Member

I would just move it to @fastify/view

@jsumners
Copy link
Member Author

Given that point-of-view does not conform to the other modules's naming style, it would be difficult to include in the automated tool. It should be done manually.

@delvedor
Copy link
Member

delvedor commented Mar 26, 2022

I would keep the same name to avoid too much confusion, so @fastify/point-of-view.
Otherwise, @fastify/view works as well.
The same needs to happen for under-pressure.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue or pr with more than 15 days of inactivity. label Apr 16, 2022
@mcollina
Copy link
Member

@jsumners is on it, hopefully shipping this in the next two weeks!

@stale stale bot removed the stale Issue or pr with more than 15 days of inactivity. label Apr 16, 2022
jsumners added a commit to fastify/fastify-bearer-auth that referenced this issue Apr 20, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify#3733.
jsumners added a commit to fastify/fastify-bearer-auth that referenced this issue Apr 20, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify#3733.
jsumners added a commit to fastify/fastify-bearer-auth that referenced this issue Apr 20, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify#3733.
jsumners added a commit to fastify/fastify-bearer-auth that referenced this issue Apr 20, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify#3733.
jsumners added a commit to fastify/fastify-bearer-auth that referenced this issue Apr 20, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify#3733.
RafaelGSS added a commit to RafaelGSS/fastify-schedule that referenced this issue May 27, 2022
This commit renames the module in accordance with the discussion in fastify/fastify#3733
RafaelGSS added a commit to fastify/fastify-awilix that referenced this issue May 27, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
Fdawgs pushed a commit to fastify/fastify-schedule that referenced this issue May 27, 2022
This commit renames the module in accordance with the discussion in fastify/fastify#3733
@RafaelGSS
Copy link
Member

I think we can update the plugin docs explaining the latest version of each module is required Fastify v4

@jsumners
Copy link
Member Author

jsumners commented Jun 3, 2022

I think we can update the plugin docs explaining the latest version of each module is required Fastify v4

Not sure I understand.

However, great job taking on the remaining modules.

@Fdawgs
Copy link
Member

Fdawgs commented Jun 3, 2022

I think we can update the plugin docs explaining the latest version of each module is required Fastify v4

Not sure I understand.

I think what @RafaelGSS is saying is that the documentation for the plugins needs updating to state what plugin versions work with what Fastify versions, as we've had a few issues raised regarding it:

@jsumners
Copy link
Member Author

jsumners commented Jun 3, 2022

I would not have recommended merging those PRs. My recommendation would have been to remove the prior notice of "use this version for this other thing's version". It's too much work to keep updated.

The mistake is releasing new final versions of plugins for v4 prior to v4 being released. Fastify should allow loading of prior versions of modules (see #3879 (comment)) and modules should not release new majors out of rc-phase until a corresponding final Fastify release is issued.

RafaelGSS added a commit to RafaelGSS/aws-lambda-fastify that referenced this issue Jun 4, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
@jsumners
Copy link
Member Author

jsumners commented Jun 5, 2022

I have added https://github.com/fastify/any-schema-you-like to the list.

adrai pushed a commit to fastify/aws-lambda-fastify that referenced this issue Jun 5, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
@mcollina
Copy link
Member

mcollina commented Jun 5, 2022

What names should we pick for those non-fastify-branded packages?

@jsumners
Copy link
Member Author

jsumners commented Jun 5, 2022

I don't have much of an opinion on that. I'd just prefix them with the org scope and move on.

@RafaelGSS
Copy link
Member

I suggest:

  • middie -> @fastify/middie

  • point-of-view -> @fastify/view

  • under-pressure -> @fastify/under-pressure

  • any-schema-you-like -> @fastify/any-schema-you-like

@Fdawgs
Copy link
Member

Fdawgs commented Jun 5, 2022

Maybe cut down any-schema-you-like to any-schema?

RafaelGSS added a commit to fastify/any-schema-you-like that referenced this issue Jun 6, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
RafaelGSS added a commit to fastify/under-pressure that referenced this issue Jun 6, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
RafaelGSS added a commit to fastify/middie that referenced this issue Jun 6, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
RafaelGSS added a commit to fastify/point-of-view that referenced this issue Jun 7, 2022
This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .
RafaelGSS added a commit to fastify/point-of-view that referenced this issue Jun 7, 2022
* Rename Module

This commit renames the module in accordance with the discussion in
fastify/fastify/issues/3733 .

* chore: update plugin name
@RafaelGSS
Copy link
Member

The remaining list is officially done!

@mcollina mcollina closed this as completed Jun 7, 2022
@jsumners
Copy link
Member Author

Thank you for finishing the list @RafaelGSS. I feel bad that I got this thing started and then couldn't finish it.

@fastify/plugins I have removed all of the non-scoped packages from the plugins team on npmjs.com. They should not be getting any further updates, so the permissions should reflect that. Please raise an issue if you determine one needs a new version for some reason. We will coordinate with those who have permissions to do so.

@fastify fastify locked as resolved and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests