Skip to content

v1.1.0: Bundled distribution via @vercel/ncc

Compare
Choose a tag to compare
@PetarKirov PetarKirov released this 25 Apr 20:30
· 18 commits to v1 since this release

This release contains only internal changes. The most notable is that now instead of including the whole node_modules folder, only a single file JavaScript file is distributed, which the result of compiling the TypeScript source code and bundling all run-time dependencies.


All (Internal) changes since v1.0.6:

  • [.editorconfig]: Enable trim_trailing_whitespace

  • [package.json]: Add @vercel/ncc@^0.27.0 dev dependency

  • [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

    • 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, as should make for cleaner generated "down-leveled" code as it has native async/await suppor

  • [node_modules]: Delete the folder from git

  • [package.json]: Upgrade dependencies to their latest available versions

  • [ci]: Verify that dist/index.js is correctly generated

  • [package.json]: Bump the version to 1.1.0
    And also update the description field.