-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat!: 2024 updates, maintainer handoff proposal #29
Conversation
The biggest blocker to #18 was onboarding this repo to our I just landed that in #31 which should allow us to more easily merge this PR. Would you be willing to fix the new conflicts I just created? I can't speak to transferring maintainership right now, but I would like to get this PR merged. |
We try to control all our linting and configuration via |
@lukekarrys Thanks for the quick response! I'll take a look at the conflicts this evening and update. |
@lukekarrys While updating the README, I realized there were a number of maintenance headaches here. 'Figured this would be a good opportunity to clean up the following:
type Maintainer = NonNullable<PackumentVersion['maintainers']>[number]; // <-- resolves to the internal `Contact` type ('still working on resolving other |
@lukekarrys Okay, so I've fixed the merge conflicts, updated the README, and made various other fixes and ✌️improvements✌️... all while doing my best to ignore Since it looks like From the
'Not using
I'd like to format the fixture files, but they contain SHA hashes (90+ chars), which eslint complains about ( For now I've added an .eslintignore file to just ignore the whole "test/fixtures" directory, but that's not ideal. I would prefer to have those formatted.
The only file this module publishes is
Also, Regarding
I get that
Can't complain too much about this one, but having VSCode set up to run |
whew... in summary, as a prospective maintainer (maybe? possibly?) I'm leery of the I like the idea of tooling that helps projects set up a standard project structure, but would prefer to see it presented in a more wizard-like fashion, so I could opt into things as-needed.
etc. Similarly, having |
To give a little perspective, Using Since a conversation about maintainership would take longer and possibly get blocked (mostly due to our team not having done that before), so my goal here to get all of these long awaited fixes finally merged and published. I think the most helpful thing would be to get a list of any true blockers that template-oss is imposing. From the list above I see:
Is there anything else you think will make it impossible to publish the new types changes and tests? |
I 100% understand. Supporting opensource is difficult and time-consuming. You gotta scale it somehow.
Impossible? No... I don't think so. Can you clear up the remaining |
@broofa I was able to get all the template-oss stuff cleared up. I also refactored the tests slightly so the fixtures are stored as snapshots. I thought it would be good to validate both that they match the types and separately be able to assert when they change. Very open to any more followup PRs you have! Thanks for your work on this. |
🤖 I have created a release *beep* *boop* --- ## [2.0.0](v1.0.2...v2.0.0) (2024-08-07) ###⚠️ BREAKING CHANGES * update types (#29) * refactor to use @npmcli/template-oss (#31) ### Features * [`123bb67`](123bb67) [#29](#29) update types (#29) (@broofa, @jablko, @lukekarrys) * [`f09f754`](f09f754) [#31](#31) refactor to use @npmcli/template-oss (#31) (@lukekarrys) ### Bug Fixes * [`6ffee7f`](6ffee7f) [#60](#60) add missing fields, fix up array type, add comments (#60) (@broofa, @styfle) * [`4548f2c`](4548f2c) [#39](#39) linting cleanup (#39) (@lukekarrys) ### Documentation * [`5511d4b`](5511d4b) [#40](#40) fix README typo, improve PackageJSON description (#40) (@broofa, @styfle) * [`1a08144`](1a08144) [#37](#37) fix typo in readme (#37) (@lukekarrys) ### Chores * [`d323311`](d323311) [#70](#70) bump @types/node from 20.12.10 to 22.1.0 (#70) (@dependabot[bot]) * [`4761562`](4761562) [#71](#71) bump @typescript-eslint/parser from 7.18.0 to 8.0.1 (#71) (@dependabot[bot]) * [`3687a18`](3687a18) [#38](#38) simplify template-oss config (#38) (@lukekarrys) * [`1a1fd85`](1a1fd85) [#36](#36) remove build script and update snapshots and tsconfig (#36) (@lukekarrys) * [`3172a32`](3172a32) update template-oss files for main branch (@lukekarrys) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@lukekarrys : Hey Luke, given the lack of action on #18 (comment), would you be willing to let me step up as maintainer here?
I know that might be a big ask, but this repo is (or at least should be) a valuable resource for clients of the registry API.
FWIW, this PR shows what I'd like to see happen with this project, at least initially, to bring it up to date and make it easier to maintain.
Summary of changes, in no particular order:
corepack
latest
@jablko put up test: check actual examples from the npm registry #15, chore: extract common declarations #16, chore: use the record type #17, feat: update types #18, and ci: test pull requests #19, all of which should have been merged long ago. To the extent feasible, they've all been incorporated here.
gts
dependencygts
is a thin wrapper aroundeslint
andprettier
, with google-opinionated settings that are no longer relevant. Usingeslint
andprettier
directly is makes these tools easier to manage and update.pacote
dependencypacote
is a level of abstraction that is not helpful. These types should accurately document what the registry endpoints provide, without possible munging by intermediate code likepacote
or it's dependencies. Using node's nativefetch()
is simpler and easier.The most important facet of @jablko's work was the addition of "fixtures" unit tests to verify registry requests actually validate against the TS types. This is a huge improvement. In addition to the endpoints @jablko set up unit tests for, I've added a few others that surfaced some issues with the types. Assuming I continue to maintain this, my plan would be to have any future changes to types be accompanied by fixtures that demonstrate how/where types are used / not used.
index.d.ts
validates against all fixtures.