From 8be1b36560cd4e5274d2f17b8d9217160bec61b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:03:56 +0200 Subject: [PATCH 1/2] Bump vite from 5.4.1 to 5.4.7 (#190) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.1 to 5.4.7. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.7/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.7/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 176 +++++++++++++++++++++++++++++------------------------- 1 file changed, 95 insertions(+), 81 deletions(-) diff --git a/yarn.lock b/yarn.lock index f0499c8..5137a86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -634,114 +634,114 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.0" +"@rollup/rollup-android-arm-eabi@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.22.4" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-android-arm64@npm:4.21.0" +"@rollup/rollup-android-arm64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-android-arm64@npm:4.22.4" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.21.0" +"@rollup/rollup-darwin-arm64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-darwin-arm64@npm:4.22.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.21.0" +"@rollup/rollup-darwin-x64@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-darwin-x64@npm:4.22.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.22.4" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.22.4" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.22.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.0" +"@rollup/rollup-linux-arm64-musl@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.22.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.22.4" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.22.4" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.22.4" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.0" +"@rollup/rollup-linux-x64-gnu@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.22.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.0" +"@rollup/rollup-linux-x64-musl@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.22.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.22.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.22.4" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.0" +"@rollup/rollup-win32-x64-msvc@npm:4.22.4": + version: 4.22.4 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.22.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4691,13 +4691,20 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": +"picocolors@npm:^1.0.0": version: 1.0.1 resolution: "picocolors@npm:1.0.1" checksum: c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 languageName: node linkType: hard +"picocolors@npm:^1.1.0": + version: 1.1.0 + resolution: "picocolors@npm:1.1.0" + checksum: 86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023 + languageName: node + linkType: hard + "picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -4730,14 +4737,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.41": - version: 8.4.41 - resolution: "postcss@npm:8.4.41" +"postcss@npm:^8.4.43": + version: 8.4.47 + resolution: "postcss@npm:8.4.47" dependencies: nanoid: "npm:^3.3.7" - picocolors: "npm:^1.0.1" - source-map-js: "npm:^1.2.0" - checksum: c1828fc59e7ec1a3bf52b3a42f615dba53c67960ed82a81df6441b485fe43c20aba7f4e7c55425762fd99c594ecabbaaba8cf5b30fd79dfec5b52a9f63a2d690 + picocolors: "npm:^1.1.0" + source-map-js: "npm:^1.2.1" + checksum: 929f68b5081b7202709456532cee2a145c1843d391508c5a09de2517e8c4791638f71dd63b1898dba6712f8839d7a6da046c72a5e44c162e908f5911f57b5f44 languageName: node linkType: hard @@ -5099,26 +5106,26 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.13.0": - version: 4.21.0 - resolution: "rollup@npm:4.21.0" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.21.0" - "@rollup/rollup-android-arm64": "npm:4.21.0" - "@rollup/rollup-darwin-arm64": "npm:4.21.0" - "@rollup/rollup-darwin-x64": "npm:4.21.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.21.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.21.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.21.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.21.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.21.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-x64-musl": "npm:4.21.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.21.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.21.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.21.0" +"rollup@npm:^4.20.0": + version: 4.22.4 + resolution: "rollup@npm:4.22.4" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.22.4" + "@rollup/rollup-android-arm64": "npm:4.22.4" + "@rollup/rollup-darwin-arm64": "npm:4.22.4" + "@rollup/rollup-darwin-x64": "npm:4.22.4" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.22.4" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.22.4" + "@rollup/rollup-linux-arm64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-arm64-musl": "npm:4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.22.4" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-s390x-gnu": "npm:4.22.4" + "@rollup/rollup-linux-x64-gnu": "npm:4.22.4" + "@rollup/rollup-linux-x64-musl": "npm:4.22.4" + "@rollup/rollup-win32-arm64-msvc": "npm:4.22.4" + "@rollup/rollup-win32-ia32-msvc": "npm:4.22.4" + "@rollup/rollup-win32-x64-msvc": "npm:4.22.4" "@types/estree": "npm:1.0.5" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -5158,7 +5165,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 984beb858da245c5e3a9027d6d87e67ad6443f1b46eab07685b861d9e49da5856693265c62a6f8262c36d11c9092713a96a9124f43e6de6698eb84d77118496a + checksum: 4c96b6e2e0c5dbe73b4ba899cea894a05115ab8c65ccff631fbbb944e2b3a9f2eb3b99c2dce3dd91b179647df1892ffc44ecee29381ccf155ba8000b22712a32 languageName: node linkType: hard @@ -5384,6 +5391,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + "spdx-correct@npm:^3.0.0": version: 3.2.0 resolution: "spdx-correct@npm:3.2.0" @@ -6035,13 +6049,13 @@ __metadata: linkType: hard "vite@npm:^5.0.0": - version: 5.4.1 - resolution: "vite@npm:5.4.1" + version: 5.4.7 + resolution: "vite@npm:5.4.7" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.41" - rollup: "npm:^4.13.0" + postcss: "npm:^8.4.43" + rollup: "npm:^4.20.0" peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 less: "*" @@ -6073,7 +6087,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: b9ea824f1a946aa494f756e6d9dd88869baa62ae5ba3071b32b6a20958fd622cb624c860bdd7daee201c83ca029feaf8bbe2d2a6e172a5d49308772f8899d86d + checksum: 0ca7ca60f71c61f3855bbabf7e33909bec32933b35914d4d281813c728183e78e7ce5be05735a7671df3a994613d3881f520a32a80715faa92effb28deee9320 languageName: node linkType: hard From ba79187ba886d724f379e638e5331ccef8c115ea Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Tue, 1 Oct 2024 19:17:04 +0200 Subject: [PATCH 2/2] Update contributing guidelines (#192) The contributing guidelines were moved into the new `CONTRIBUTING.md`. Contributing instructions are not very useful for most users. Also this file is picked up in various places by GitHub. --- CONTRIBUTING.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 25 +++------------- 2 files changed, 84 insertions(+), 21 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..47da034 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing + +We'd be happy to accept pull requests. If you plan on working on something big, please first drop us a line! + +## Getting started + +To get started, first fork the project on GitHub and clone the project using Git. + +## Dependencies management + +This project uses [Yarn](https://yarnpkg.com) 4 for dependency management. To install dependencies, run the following command from the project root: + +```sh +yarn install +``` + +To check for updates, run: + +```sh +yarn upgrade-interactive +``` + +## Linting + +This project is linted using [ESLint](https://eslint.org). You can lint the project by running: + +```sh +yarn eslint . +``` + +## Formatting + +This project is formatted using [Prettier](https://prettier.io). You can check format the project: + +```sh +prettier --write . +``` + +## Testing + +This project is tested using [Vitest](https://vitest.dev). There are two kinds of tests. + +### Unit tests + +Unit tests are in the [`test/unit`](test/unit) folder of the project. You can run them using the following command: + +```sh +yarn vitest test/unit +``` + +### Integration tests + +Integration tests are in the [`test/integration`](test/integration) folder. They require some extra setup. + +Firstly, these tests require the Cloudflare executable. You can download this with: + +```sh +curl -fsSLo cloudflared-linux-amd64 https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 +chmod +x cloudflared-linux-amd64 +``` + +They also require a Transloadit key and secret, which you can get from https://transloadit.com/c/credentials. + +You can run the integration tests with: + +```sh +TRANSLOADIT_KEY='YOUR_TRANSLOADIT_KEY' TRANSLOADIT_SECRET='YOUR_TRANSLOADIT_SECRET' CLOUDFLARED_PATH='./cloudflared-linux-amd64' vitest run test/integration +``` + +## Releasing + +Only maintainers can make releases. Releases to [npm](https://www.npmjs.com) are automated using GitHub actions. To make a release, perform the following steps: + +1. Update the version using Yarn, e.g. `yarn version patch`. This will create a new Git commit and tag. +2. Push the tag to GitHub. + ```sh + git push origin main --tags + ``` +3. If the tests pass, GitHub actions will now publish the new version to npm. +4. When successful add [release notes](https://github.com/transloadit/node-sdk/releases). diff --git a/README.md b/README.md index 8983366..e1b66bc 100644 --- a/README.md +++ b/README.md @@ -451,31 +451,14 @@ DEBUG=transloadit* node examples/template_api.js - [Mikael Finstad](https://github.com/mifi) -## Contributing - -We'd be happy to accept pull requests. If you plan on working on something big, please first drop us a line! - -### Testing - -Check your sources for linting errors via `npm run lint`, and unit tests, and run them via `npm test` - -### Releasing - -1. Install [np](https://github.com/sindresorhus/np): `npm i -g np` -2. Wait for [tests to succeed](https://github.com/transloadit/node-sdk/actions). -3. Run `np` and follow instructions. -4. When successful add [release notes](https://github.com/transloadit/node-sdk/releases). - -### Change log +### Changelog See [Releases](https://github.com/transloadit/node-sdk/releases) -### Convenience +## Attribution -If you come from a unix background and fancy faster auto-complete, you'll be delighted to know that all npm scripts are also accessible under `make`, via fakefile. +Thanks to [Ian Hansen](https://github.com/supershabam) for donating the `transloadit` npm name. You can still access his code under [`v0.0.0`](https://www.npmjs.com/package/transloadit/v/0.0.0). ## License -[MIT](LICENSE) - -Thanks to [Ian Hansen](https://github.com/supershabam) for donating the `transloadit` npm name. You can still access his code under `v0.0.0`. +[MIT](LICENSE) © [Transloadit](https://transloadit.com)