Skip to content

Commit

Permalink
chore: upgrade dependencies and CI template
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Nov 7, 2023
1 parent d7aaa79 commit de805d3
Show file tree
Hide file tree
Showing 10 changed files with 3,528 additions and 3,046 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.10.1
version: 0.11.0
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
Expand Down Expand Up @@ -164,37 +164,38 @@ jobs:
- uses: actions/checkout@v4
- name: Build
id: build
uses: vmactions/freebsd-vm@v0
uses: cross-platform-actions/action@v0.21.1
env:
DEBUG: napi:*
RUSTUP_HOME: /usr/local/rustup
CARGO_HOME: /usr/local/cargo
RUSTUP_IO_THREADS: 1
with:
envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS
usesh: true
mem: 3000
prepare: |
pkg install -y -f curl node libnghttp2 npm yarn
operating_system: freebsd
version: '13.2'
memory: 13G
cpu_count: 3
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm yarn
sudo npm install -g yarn --ignore-scripts
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain beta
export PATH="/usr/local/cargo/bin:$PATH"
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
run: |
export PATH="/usr/local/cargo/bin:$PATH"
pwd
ls -lah
whoami
env
freebsd-version
yarn install
yarn build
strip -x *.node
yarn test
rm -rf node_modules
rm -rf target
Expand All @@ -218,8 +219,8 @@ jobs:
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- '16'
- '18'
- '20'
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -248,8 +249,8 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -279,8 +280,8 @@ jobs:
fail-fast: false
matrix:
node:
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -312,9 +313,7 @@ jobs:
fail-fast: false
matrix:
node:
- '14'
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -346,7 +345,7 @@ jobs:
yarn test
ls -la
test-linux-aarch64-musl-binding:
name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
name: Test bindings on aarch64-unknown-linux-musl - node@lts
needs:
- build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -386,9 +385,8 @@ jobs:
fail-fast: false
matrix:
node:
- '14'
- '16'
- '18'
- '20'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.1.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
yarnPath: .yarn/releases/yarn-3.6.4.cjs
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ napi = { version = "2", features = ["napi5", "serde-json"] }
napi-derive = { version = "2" }
snap = "1"

[target.'cfg(not(target_os = "linux"))'.dependencies]
[target.'cfg(all(not(target_os = "linux"), not(target_os = "wasi")))'.dependencies]
mimalloc-rust = "0.2"

[target.'cfg(all(target_os = "linux", not(all(target_env = "musl", target_arch = "aarch64"))))'.dependencies]
Expand Down
34 changes: 15 additions & 19 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
/* tslint:disable */
/* auto-generated by NAPI-RS */
/* eslint-disable */

/* auto-generated by NAPI-RS */
export function compress(input: string | Buffer, options?: EncOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>

export function compressSync(input: string | Buffer, options?: EncOptions | undefined | null): Buffer

export interface DecOptions {
asBuffer?: boolean
/**
* do not use `create_external_buffer` to create the output buffer
* set this option to `true` will make the API slower
* for compatibility with electron >= 21
* see https://www.electronjs.org/blog/v8-memory-cage and https://github.com/electron/electron/issues/35801#issuecomment-1261206333
*/
copyOutputData?: boolean
}

export interface EncOptions {
/**
* do not use `create_external_buffer` to create the output buffer
* for compatibility with electron >= 21
* set this option to `true` will make the API slower
* see https://www.electronjs.org/blog/v8-memory-cage and https://github.com/electron/electron/issues/35801#issuecomment-1261206333
*/
copyOutputData?: boolean
}
export function compressSync(input: string | Buffer, options?: EncOptions | undefined | null): Buffer
export function compress(
input: string | Buffer,
options?: EncOptions | undefined | null,
signal?: AbortSignal | undefined | null,
): Promise<Buffer>

export function uncompress(input: string | Buffer, options?: DecOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<string | Buffer>

export function uncompressSync(input: string | Buffer, options?: DecOptions | undefined | null): string | Buffer
export function uncompress(
input: string | Buffer,
options?: DecOptions | undefined | null,
signal?: AbortSignal | undefined | null,
): Promise<string | Buffer>

Loading

0 comments on commit de805d3

Please sign in to comment.