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

Add semver types to dependencies in definitions-parser #763

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

jakebailey
Copy link
Member

Otherwise you get:

node_modules/.pnpm/@definitelytyped+definitions-parser@0.0.179_typescript@5.3.0-dev.20231018/node_modules/@definitelytyped/definitions-parser/dist/packages.d.ts:4:25 - error TS7016: Could not find a declaration file for module 'semver'. '/home/jabaile/work/DefinitelyTyped/node_modules/.pnpm/semver@7.5.4/node_modules/semver/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/semver` if it exists or add a new declaration (.d.ts) file containing `declare module 'semver';`

4 import * as semver from "semver";

@jakebailey
Copy link
Member Author

Things are also broken a different way:

node_modules/.pnpm/@definitelytyped+definitions-parser@0.0.180_typescript@5.3.0-dev.20231018/node_modules/@definitelytyped/definitions-parser/dist/packages.d.ts:1:10 - error TS2305: Module '"@definitelytyped/header-parser"' has no exported member 'Contributor'.

1 import { Contributor, Header, License } from "@definitelytyped/header-parser";
           ~~~~~~~~~~~

Some sort of missing package bump?

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, header-parser hasn't published this change, but definitions-parser has been published for something else since then #757

@jakebailey
Copy link
Member Author

Oh, #757 didn't include a changeset so things shipped broken. That's probably an error; should I send a PR with that or tack it on here?

@andrewbranch
Copy link
Member

Either way, or just push one to master.

We can add the changeset bot to remind PRs to include them, or their GitHub Action to enforce that they be included. The problem with both is that they can’t be filtered to a set of files, so it would pester people who are updating allowedPackageJsonDependencies.txt. I guess we could easily write our own shell script and include it in CI checks, though.

@jakebailey
Copy link
Member Author

To use the changeset bot, we'd have to add the App to our repo; not sure that we can do that since it's actually installed at the org level? Maybe someone else was nice enough to have done it. Would be nice if they had a version of their App that instead could run as a GHA pull_request_target workflow. That actually sounds pretty straightforward to implement...

@jakebailey jakebailey merged commit 8cae067 into microsoft:master Oct 19, 2023
5 checks passed
@jakebailey jakebailey deleted the definition-parser-deps branch October 19, 2023 19:18
@jakebailey
Copy link
Member Author

Ah, that's changesets/bot#54. I guess it was an action before but was changed to an app before pull_request_target became a thing.

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

Successfully merging this pull request may close these issues.

None yet

2 participants