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 - name: Setup Node.js
uses: actions/setup-node@v3.6.0 uses: actions/setup-node@v3.6.0
with: with:
node-version: 16.x node-version: 18.x
- name: Yarn cache - name: Yarn cache
uses: actions/cache@v3 uses: actions/cache@v3
@@ -55,7 +55,9 @@ jobs:
run: yarn run: yarn
- name: Install Nix - 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 - name: Setup Cachix
if: github.event_name == 'push' && github.repository_owner == 'stephank' 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", "build-dev": "./build.js",
"fmt": "prettier --write src" "fmt": "prettier --write src"
}, },
"packageManager": "yarn@3.2.4", "packageManager": "yarn@3.3.1",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.11.4", "@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-class-properties": "^7.10.4",
+7 -1
View File
@@ -154,8 +154,13 @@ let
mkdir -p "$out/libexec/$name" "$out/bin" mkdir -p "$out/libexec/$name" "$out/bin"
# Move the package contents to the output directory. # Move the package contents to the output directory.
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
# - If the package.json has a `files` field, only files matching those patterns are copied # - If the package.json has a `files` field, only files matching those patterns are copied
# - Otherwise all files are copied # - Otherwise all files are copied.
yarn pack --out package.tgz yarn pack --out package.tgz
tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1 tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1
@@ -170,6 +175,7 @@ let
# Otherwise, assume PnP. Copy the loader into the package. # Otherwise, assume PnP. Copy the loader into the package.
cp .pnp.* "$out/libexec/$name" cp .pnp.* "$out/libexec/$name"
fi fi
fi
cd "$out/libexec/$name" cd "$out/libexec/$name"
+1 -1
View File
@@ -3216,7 +3216,7 @@ __metadata:
"typescript@patch:typescript@4.5.4#~builtin<compat/typescript>": "typescript@patch:typescript@4.5.4#~builtin<compat/typescript>":
version: 4.5.4 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: bin:
tsc: bin/tsc tsc: bin/tsc
tsserver: bin/tsserver tsserver: bin/tsserver