Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build]: Replace
node_modules
with a single-file bundle produced by…
… `ncc` Detailed description of changes: * Update the `build` script in `package.json` so that it builds and "links" the TypeScript code along with all of its (transitive) dependencies in a single `index.js` file using `@vercel/ncc`. * Add / copy `scripts/{Invoke-7zdec.ps1,externals/7zdec.exe}` from `node_modules/@actions/tool-cache/scripts` as its needed by the aforementioned dependency on Windows and it used to be included in the `node_modules` folder which will be deleted by the next commit. * Change the `main` file in `package.json` and `action.yml` to `dist/index.js`. `ncc` allows only the out dir can be specified - the filename is always `index.js`. * Add `lib/` and `dist/*` to .gitingore, but exclude `dist/index.js` from the list so it will be committed. * Delete the `lib/` folder * `node_modules` will be deleted in the next commit to make make the reviewing easier. * Add the `dist/index.js` file produced by running `npm run build`. * Add a `.gitattributes` file in order to set mark `dist/**` as `binary` for git diff and merge purposes. A wildcard is used as a sourcemap file could also be included later if necessary, which should also be considered a "binary" file. * Update `.gitignore` to the latest version from here: `https://github.com/github/gitignore/blob/master/Node.gitignore` * Set the `target` in `tsconfig.json` to `es2017`, which is [supported by current Node.js version - v12][1], as should make for cleaner generated "down-leveled" code as it has native async/await support [1]: https://node.green/
- Loading branch information