Merge pull request #57 from stephank/fix/workspaces

Upgrades, fix workspaces
This commit is contained in:
Stéphan Kochen
2023-01-23 14:37:56 +01:00
committed by GitHub
6 changed files with 337 additions and 307 deletions
+4 -2
View File
@@ -20,7 +20,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3.6.0
with:
node-version: 16.x
node-version: 18.x
- name: Yarn cache
uses: actions/cache@v3
@@ -55,7 +55,9 @@ jobs:
run: yarn
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v21
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Setup Cachix
if: github.event_name == 'push' && github.repository_owner == 'stephank'
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-3.2.4.cjs
yarnPath: .yarn/releases/yarn-3.3.1.cjs
+1 -1
View File
@@ -8,7 +8,7 @@
"build-dev": "./build.js",
"fmt": "prettier --write src"
},
"packageManager": "yarn@3.2.4",
"packageManager": "yarn@3.3.1",
"devDependencies": {
"@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.10.4",
+20 -14
View File
@@ -154,21 +154,27 @@ let
mkdir -p "$out/libexec/$name" "$out/bin"
# Move the package contents to the output directory.
# - If the package.json has a `files` field, only files matching those patterns are copied
# - Otherwise all files are copied
yarn pack --out package.tgz
tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1
cp .yarnrc* '@@LOCKFILE@@' "$out/libexec/$name"
cp --recursive .yarn "$out/libexec/$name"
# If the project uses the node-modules linker, then
# include the node_modules folder in the package.
if [ -d node_modules ]; then
cp --recursive node_modules "$out/libexec/$name"
if grep -q '"workspaces"' package.json; then
# We can't use `yarn pack` in a workspace setup, because it only
# packages the outer workspace.
mv $PWD "$out/libexec/$name"
else
# Otherwise, assume PnP. Copy the loader into the package.
cp .pnp.* "$out/libexec/$name"
# - If the package.json has a `files` field, only files matching those patterns are copied
# - Otherwise all files are copied.
yarn pack --out package.tgz
tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1
cp .yarnrc* '@@LOCKFILE@@' "$out/libexec/$name"
cp --recursive .yarn "$out/libexec/$name"
# If the project uses the node-modules linker, then
# include the node_modules folder in the package.
if [ -d node_modules ]; then
cp --recursive node_modules "$out/libexec/$name"
else
# Otherwise, assume PnP. Copy the loader into the package.
cp .pnp.* "$out/libexec/$name"
fi
fi
cd "$out/libexec/$name"
+1 -1
View File
@@ -3216,7 +3216,7 @@ __metadata:
"typescript@patch:typescript@4.5.4#~builtin<compat/typescript>":
version: 4.5.4
resolution: "typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=701156"
resolution: "typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=bcec9a"
bin:
tsc: bin/tsc
tsserver: bin/tsserver