From 7369033225b69368312661c236406678d915cde8 Mon Sep 17 00:00:00 2001 From: Rajdeep Malakar Date: Mon, 23 Oct 2023 20:55:59 +0530 Subject: [PATCH] +vercel.com/pkg (#3776) * +vercel.com/pkg * fix * `npm i` is required * fix * wrong place dep * fix --- projects/vercel.com/pkg/fixture.js | 1 + projects/vercel.com/pkg/package.yml | 44 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 projects/vercel.com/pkg/fixture.js create mode 100644 projects/vercel.com/pkg/package.yml diff --git a/projects/vercel.com/pkg/fixture.js b/projects/vercel.com/pkg/fixture.js new file mode 100644 index 00000000..ae9e3a99 --- /dev/null +++ b/projects/vercel.com/pkg/fixture.js @@ -0,0 +1 @@ +console.log("Hello, World!"); \ No newline at end of file diff --git a/projects/vercel.com/pkg/package.yml b/projects/vercel.com/pkg/package.yml new file mode 100644 index 00000000..11170908 --- /dev/null +++ b/projects/vercel.com/pkg/package.yml @@ -0,0 +1,44 @@ +distributable: + url: https://github.com/vercel/pkg/archive/refs/tags/{{version.raw}}.tar.gz + strip-components: 1 + +versions: + github: vercel/pkg/tags + +dependencies: + #FIXME I don't know which versions it supports, but Node.js v18 is one of the most well-supported ones. + nodejs.org: "*" + +build: + dependencies: + npmjs.com: "*" + + script: | + npm i + npm install --global --build-from-source --prefix={{prefix}} --install-links + +test: + dependencies: + nodejs.org: "*" + vercel.com/pkg: "*" + script: | + test "$(pkg --version)" = "{{version.raw}}" + pkg fixture.js -t node18-$TARGET -o fixture + test "$(./fixture)" = "Hello, World!" + #FIXME Simplify this + env: + linux/x86-64: { + TARGET: "linux-x64" + } + linux/aarch64: { + TARGET: "linux-arm64" + } + darwin/x86-64: { + TARGET: "macos-x64" + } + darwin/aarch64: { + TARGET: "macos-arm64" + } + +provides: + - bin/pkg