trilom / file-changes-action

This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.
MIT License
167 stars 48 forks source link

Please check in package-lock.json #3

Closed dorner closed 4 years ago

dorner commented 4 years ago

I'm trying to create a PR for this (to add an input variable to output a plain space-delimited string instead of a JSON string) and running tsc does not work after running npm install:

node_modules/@actions/github/lib/github.d.ts:5:37 - error TS2507: Type 'typeof import("/Users/danielorner/RubymineProjects/file-changes-action/node_modules/@octokit/rest/index")' is not a constructor function type.

5 export declare class GitHub extends Octokit {
                                      ~~~~~~~

node_modules/@actions/github/lib/github.d.ts:7:52 - error TS2694: Namespace '"/Users/danielorner/RubymineProjects/file-changes-action/node_modules/@octokit/rest/index"' has no exported member 'Options'.

7     constructor(token: string, opts?: Omit<Octokit.Options, 'auth'>);
                                                     ~~~~~~~

src/main.ts:72:26 - error TS2339: Property 'pulls' does not exist on type 'GitHub'.

72   const options = client.pulls.listFiles.endpoint.merge({
                            ~~~~~

src/main.ts:78:18 - error TS2339: Property 'paginate' does not exist on type 'GitHub'.

78     await client.paginate(options).then(files => {
                    ~~~~~~~~

src/main.ts:89:33 - error TS2339: Property 'repos' does not exist on type 'GitHub'.

89   const response = await client.repos.compareCommits({
                                   ~~~~~

I imagine there's some version mismatch here. If you add your package-lock.json I should be able to mirror your setup and complete my PR.

trilom commented 4 years ago

This should be resolved. Please be sure to use yarn for example yarn build will build the project.