obi1kenobi / cargo-semver-checks-action

A GitHub Action for running cargo-semver-checks
MIT License
59 stars 15 forks source link

Upgrade glob to 10.4.2 #78

Closed memark closed 2 months ago

memark commented 2 months ago

When typechecking (npx tsc -b) the project locally, an error is reported

node_modules/path-scurry/dist/cjs/index.d.ts:115:31 - error TS2720: Class 'PathBase' incorrectly implements class 'Dirent'. Did you mean to extend 'Dirent' and inherit its members as a subclass?
  Property 'path' is missing in type 'PathBase' but required in type 'Dirent'.

115 export declare abstract class PathBase implements Dirent {
                                  ~~~~~~~~

  node_modules/@types/node/fs.d.ts:247:9
    247         path: string;
                ~~~~
    'path' is declared here.

This is fixed in newer versions of path-scurry, which we pull in via glob.

Updating glob solves the issue.

obi1kenobi commented 2 months ago

Ah, you'll have to compile the typescript source into a compiled JS artifact in dist/. This is an unfortunate but standard workflow for GitHub Actions, since the action runners can only run JS, not TS.

Run npm run build and commit & push the changes it made, and this should pass CI.

Thanks for digging into this, I appreciate it! If you'd be open to making another PR, I'd also love a ## Contributing section in the README (or a separate CONTRIBUTING.md file) that describes the steps you had to take, since in retrospect they are not obvious.

memark commented 2 months ago

Ah, got it. Makes sense.

Thanks for the explanation. I'll look into creating a small file for contributing. (I do think it should be separate, given that the README is what also shows up at the Github actions marketplace.)

obi1kenobi commented 2 months ago

I do think it should be separate, given that the README is what also shows up at the Github actions marketplace.

Good call! I forgot about the marketplace preview.