Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@ jobs:
node-libcurl-cpp-std:
- c++17
node:
- 18.18.2
- 20.9.0

env:
LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
LATEST_LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
NODE_LIBCURL_CPP_STD: ${{ matrix.node-libcurl-cpp-std }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- if: runner.os == 'macOS'
name: Install Needed packages on macOS
run: brew install coreutils wget automake libtool cmake gnu-sed m4
Expand All @@ -62,6 +56,12 @@ jobs:
- if: runner.os == 'Linux'
name: Install Needed packages on Linux
run: sudo apt-get install -y cmake
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Output yarn cache dir
id: yarn-cache-dir
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -110,21 +110,15 @@ jobs:
libcurl-release:
- 7.79.1
node:
- 18.18.2
- 20.9.0
electron-version:
- 28.0.0
- 29.0.0
env:
LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
LATEST_LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
ELECTRON_VERSION: ${{ matrix.electron-version }}
NODE_LIBCURL_CPP_STD: c++17
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- if: runner.os == 'macOS'
name: Install Needed packages
run: brew install coreutils wget automake libtool cmake gnu-sed m4
Expand All @@ -143,6 +137,12 @@ jobs:
- if: runner.os == 'Linux'
name: Install Needed packages on Linux
run: sudo apt-get install -y cmake
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Output yarn cache dir
id: yarn-cache-dir
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
fail-fast: false
matrix:
node:
- 18.18.2
- 20.9.0
env:
npm_config_msvs_version: 2022
npm_config_build_from_source: true
Expand Down Expand Up @@ -237,9 +237,9 @@ jobs:
fail-fast: false
matrix:
node:
- 18.18.2
- 20.9.0
electron-version:
- 28.0.0
- 29.0.0
env:
ELECTRON_VERSION: ${{ matrix.electron-version }}
npm_config_msvs_version: 2022
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/build-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
node-libcurl-cpp-std:
- c++17
node:
- 18.18.2
- 20.9.0
include:
# Lint
- os: ubuntu-latest
node: 18.18.2
node: 20.9.0
node-libcurl-cpp-std: c++17
libcurl-release: 7.79.1
run-lint-and-tsc: true
Expand All @@ -52,12 +52,6 @@ jobs:
${{ github.run_id }}-${{ github.job }}-
- id: run_result
run: cat run_result 2>/dev/null || echo 'default'
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- if: runner.os == 'macOS'
name: Install Needed packages on macOS
run: brew install coreutils wget automake libtool cmake gnu-sed m4
Expand All @@ -76,18 +70,24 @@ jobs:
- if: runner.os == 'Linux'
name: Install Needed packages on Linux
run: sudo apt-get install -y cmake
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Output yarn cache dir
id: yarn-cache-dir
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore Yarn Cache
- name: Restore Yarn Cache ${{ matrix.node }}-${{ github.ref }}
uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: v1-${{ runner.os }}-yarn-cache-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
key: v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-${{ runner.os }}-yarn-cache-${{ github.ref }}-
v1-${{ runner.os }}-yarn-cache-
v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-${{ github.ref }}-
v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-
- name: Restore libcurl deps cache
uses: actions/cache@v3
id: libcurl-deps-cache
Expand All @@ -98,7 +98,7 @@ jobs:
key: v4-build-lint-test-${{ runner.os }}-libcurl-deps-cache-node-${{ matrix.node }}
restore-keys: |
v4-build-lint-test-${{ runner.os }}-libcurl-deps-cache-node-${{ matrix.node }}
- name: 'Build node-libcurl'
- name: Build node-libcurl ${{ matrix.node }}
if: steps.run_result.outputs.run_result != 'success'
run: |
RUN_TESTS=false \
Expand Down Expand Up @@ -144,9 +144,9 @@ jobs:
libcurl-release:
- 7.79.1
node:
- 18.18.2
- 20.9.0
electron-version:
- 28.0.0
- 29.0.0
env:
LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
LATEST_LIBCURL_RELEASE: ${{ matrix.libcurl-release }}
Expand All @@ -165,12 +165,6 @@ jobs:
${{ github.run_id }}-${{ github.job }}-
- id: run_result
run: cat run_result 2>/dev/null || echo 'default'
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand All @@ -188,18 +182,24 @@ jobs:
make install
autoconf --version
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Output yarn cache dir
id: yarn-cache-dir
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore Yarn Cache
- name: Restore Yarn Cache ${{ matrix.node }}-${{ github.ref }}
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: v1-${{ runner.os }}-yarn-cache-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
key: v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-${{ runner.os }}-yarn-cache-${{ github.ref }}-
v1-${{ runner.os }}-yarn-cache-
v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-${{ github.ref }}-
v1-${{ runner.os }}-yarn-cache-${{ matrix.node }}-
- name: Restore Electron Cache
uses: actions/cache@v3
with:
Expand All @@ -221,7 +221,7 @@ jobs:
- name: 'Set GIT_TAG'
if: startsWith(github.ref, 'refs/tags')
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: 'Build node-libcurl'
- name: Build node-libcurl ${{ matrix.node }} ${{ matrix.electron-version }}
if: steps.run_result.outputs.run_result != 'success'
run: |
RUN_TESTS=true \
Expand All @@ -244,7 +244,7 @@ jobs:
fail-fast: false
matrix:
node:
- 18.18.2
- 20.9.0
env:
npm_config_msvs_version: 2022
npm_config_build_from_source: true
Expand All @@ -262,7 +262,7 @@ jobs:
choco install nasm -y
$env:PATH=$env:PROGRAMFILES + "\NASM;" + $env:Path
python deps\curl-for-windows\configure.py
- name: Build
- name: Build ${{ matrix.node }}
run: |
$env:PATH=$env:PROGRAMFILES + "\NASM;" + $env:Path
yarn install --frozen-lockfile
Expand All @@ -281,9 +281,9 @@ jobs:
fail-fast: false
matrix:
node:
- 18.18.2
- 20.9.0
electron-version:
- 28.0.0
- 29.0.0
env:
ELECTRON_VERSION: ${{ matrix.electron-version }}
npm_config_msvs_version: 2022
Expand All @@ -306,7 +306,7 @@ jobs:
$env:PATH=$env:PROGRAMFILES + "\NASM;" + $env:Path
python deps\curl-for-windows\configure.py
yarn global add electron@${env:ELECTRON_VERSION}
- name: Build
- name: Build ${{ matrix.node }}
run: |
$env:PATH=$env:PROGRAMFILES + "\NASM;" + $env:Path
yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: 18.18.2
node-version: 20.9.0
registry-url: 'https://registry.npmjs.org'
- name: Install
run: yarn install --ignore-scripts
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.2
20.9.0
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getinsomnia/node-libcurl",
"version": "2.4.1-9",
"version": "2.4.29-1",
"description": "The fastest http(s) client (and much more) for Node.js - Node.js bindings for libcurl",
"keywords": [
"node-curl",
Expand Down Expand Up @@ -75,9 +75,9 @@
]
},
"dependencies": {
"@mapbox/node-pre-gyp": "1.0.5",
"@mapbox/node-pre-gyp": "1.0.11",
"env-paths": "2.2.0",
"nan": "2.18.0",
"nan": "2.19.0",
"node-gyp": "10.0.1",
"npmlog": "4.1.2",
"rimraf": "^3.0.2",
Expand Down Expand Up @@ -129,7 +129,7 @@
"typescript": "^4.0.3"
},
"engines": {
"node": ">= 18"
"node": ">= 20"
},
"np": {
"cleanup": false
Expand Down
7 changes: 6 additions & 1 deletion scripts/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ echo "npm_config_dist_url=$npm_config_dist_url"
echo "npm_config_target=$npm_config_target"
echo "npm_config_target_arch=$npm_config_target_arch"

echo "node version: $(node -v)"
echo "yarn version: $(yarn -v)"

yarn install --frozen-lockfile --network-timeout 300000

if [ "$STOP_ON_INSTALL" == "true" ]; then
Expand Down Expand Up @@ -406,12 +409,14 @@ if [[ $PUBLISH_BINARY == true && $LIBCURL_RELEASE == $LATEST_LIBCURL_RELEASE ]];
node scripts/module-packaging.js --publish "$(yarn --silent pregyp reveal staged_tarball --silent)"
fi
fi

echo "node version: $(node -v)"
echo "yarn version: $(yarn -v)"
# In case we published the binaries, verify if we can download them, and that they work
# Otherwise, unpublish them
INSTALL_RESULT=0
if [[ $PUBLISH_BINARY == true ]]; then
echo "Publish binary is true - Testing if it was published correctly"

INSTALL_RESULT=$(npm_config_fallback_to_build=false yarn install --frozen-lockfile --network-timeout 300000 > /dev/null)$? || true
fi
if [[ $INSTALL_RESULT != 0 ]]; then
Expand Down
3 changes: 3 additions & 0 deletions src/Curl.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/CurlHttpPost.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/CurlVersionInfo.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Easy.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Http2PushFrameHeaders.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Multi.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Share.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
3 changes: 3 additions & 0 deletions src/node_libcurl.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef NOMINMAX
# define NOMINMAX // To remove conflicts with recent v8 code std::numeric_limits<int>::max()
#endif
/**
* Copyright (c) Jonathan Cardoso Machado. All Rights Reserved.
*
Expand Down
Loading