From 06051476ec5076ca98cec6538f169c9b7517a5e9 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:28:28 +0200 Subject: [PATCH 01/11] bump version --- lib/index.js | 1 - package.json | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index bdeb11a..b064918 100644 --- a/lib/index.js +++ b/lib/index.js @@ -9,7 +9,6 @@ const escapeFilter = (filter) => { module.exports = { exec: (object, filter) => { try { - console.log(escapeFilter(filter)) const data = nativeJq.exec(JSON.stringify(object), escapeFilter(filter)) return data?.value; diff --git a/package.json b/package.json index bb99dd9..189ccfd 100755 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@port-labs/jq-node-bindings", - "version": "v0.0.4", + "version": "v0.0.5", "description": "Node.js bindings for JQ", - "jq-node-bindings": "0.0.4", + "jq-node-bindings": "0.0.5", "main": "lib/index.js", "scripts": { "configure": "node-gyp configure", @@ -45,4 +45,4 @@ "engines": { "node": ">=6.0.0" } -} +} \ No newline at end of file From c9cb4aec0b932351400c1c13e24123a613b349d1 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:30:44 +0200 Subject: [PATCH 02/11] ignore reports --- .gitignore | 5 +---- .npmignore | 1 + reports/jest-port-api.xml | 41 --------------------------------------- 3 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 reports/jest-port-api.xml diff --git a/.gitignore b/.gitignore index 95410c4..ffcbe47 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,8 @@ build/ node_modules/ deps/jq npm-debug.log - docs - .DS_Store - .vscode - load.js +reports/ \ No newline at end of file diff --git a/.npmignore b/.npmignore index b465b45..776f35e 100644 --- a/.npmignore +++ b/.npmignore @@ -10,3 +10,4 @@ build **/.git .git */.git +reports/** \ No newline at end of file diff --git a/reports/jest-port-api.xml b/reports/jest-port-api.xml deleted file mode 100644 index ff6cbe3..0000000 --- a/reports/jest-port-api.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 9f3f9700929658677d5716b3d106cb68b040e5d1 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:32:12 +0200 Subject: [PATCH 03/11] change include dir --- binding.gyp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index c9c1114..0318b08 100755 --- a/binding.gyp +++ b/binding.gyp @@ -8,7 +8,7 @@ "include_dirs": [ " Date: Fri, 17 Feb 2023 21:40:12 +0200 Subject: [PATCH 04/11] trying to fix not found error --- binding.gyp | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/binding.gyp b/binding.gyp index 0318b08..0aebc55 100755 --- a/binding.gyp +++ b/binding.gyp @@ -15,8 +15,8 @@ 'OS=="linux"', { "libraries": [ - "../build/deps/libjq.so.1", "-Wl,-rpath='$$ORIGIN/../deps'", + "../build/deps/libjq.so.1", ], 'cflags_cc': [ '-std=c++17' diff --git a/package-lock.json b/package-lock.json index d220a6f..b64143c 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@port-labs/jq-node-bindings", - "version": "v0.0.4", + "version": "v0.0.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@port-labs/jq-node-bindings", - "version": "v0.0.4", + "version": "v0.0.5", "hasInstallScript": true, "license": "MIT", "dependencies": { From e845f04104c6b51867e64960430a48e34441d88c Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:44:34 +0200 Subject: [PATCH 05/11] tr ying to see file tree --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54420fb..ea79a72 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - name: Install node-gyp deps run: | if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then - sudo apt-get install -y autoconf make libtool automake + sudo apt-get install -y autoconf make libtool automake tree else brew install autoconf automake libtool fi @@ -31,6 +31,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: npm ci + - run: npm ci || true + - run: tree - run: npm run build --if-present - run: npm test From 8c99df6ad5331d2142133156636099325e4fbb97 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:52:31 +0200 Subject: [PATCH 06/11] tree after rebuild --- .github/workflows/test.yml | 1 + package-lock.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea79a72..3ef4cb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,4 +34,5 @@ jobs: - run: npm ci || true - run: tree - run: npm run build --if-present + - run: tree - run: npm test diff --git a/package-lock.json b/package-lock.json index b64143c..74ff933 100755 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "@port-labs/jq-node-bindings", "version": "v0.0.5", - "hasInstallScript": true, "license": "MIT", "dependencies": { "bindings": "^1.3.1", From 662e170d4f49b6a56319edb469c599fb27d22572 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:55:58 +0200 Subject: [PATCH 07/11] configure before ci --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ef4cb3..b50469c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: npm ci || true + - run: npm configure + - run: npm ci - run: tree - run: npm run build --if-present - run: tree From f4a483c5f8631edda08f0ceb0a1abc54ff885db7 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:56:10 +0200 Subject: [PATCH 08/11] configure before ci --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b50469c..90e9850 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,7 +31,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: npm configure + - run: npm run configure - run: npm ci - run: tree - run: npm run build --if-present From 44fffc5c470cc4fe15048dabfcf7b2c31ebe0e71 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 21:57:34 +0200 Subject: [PATCH 09/11] install before configure --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90e9850..e8247ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: npm install - run: npm run configure - run: npm ci - run: tree From 9d299b3a3a84d880a627791df87e383d0e1bedf1 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 22:07:12 +0200 Subject: [PATCH 10/11] Trying to copy before install lib make --- configure | 7 +++++++ package-lock.json | 1 + 2 files changed, 8 insertions(+) diff --git a/configure b/configure index d44c9d3..98bac4b 100755 --- a/configure +++ b/configure @@ -15,6 +15,13 @@ CPPFLAGS=-D_REENTRANT ./configure \ --libdir="${scriptdir}/build/deps" \ --prefix="${scriptdir}/build/deps" $* make -j8 + +cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a +cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la +cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai +cp modules/oniguruma/src/.libs/libonig.4.dylib ${scriptdir}/build/deps/libonig.4.dylib +cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dylib + make install-libLTLIBRARIES install-includeHEADERS cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a diff --git a/package-lock.json b/package-lock.json index 74ff933..b64143c 100755 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "@port-labs/jq-node-bindings", "version": "v0.0.5", + "hasInstallScript": true, "license": "MIT", "dependencies": { "bindings": "^1.3.1", From 73eab700323cd64f993bbce25eddbd908141bf39 Mon Sep 17 00:00:00 2001 From: danielsinai Date: Fri, 17 Feb 2023 22:09:21 +0200 Subject: [PATCH 11/11] removed unused steps in the CI --- .github/workflows/test.yml | 6 +----- configure | 6 ------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8247ef..3da362b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - name: Install node-gyp deps run: | if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then - sudo apt-get install -y autoconf make libtool automake tree + sudo apt-get install -y autoconf make libtool automake else brew install autoconf automake libtool fi @@ -31,10 +31,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run configure - run: npm ci - - run: tree - run: npm run build --if-present - - run: tree - run: npm test diff --git a/configure b/configure index 98bac4b..320544d 100755 --- a/configure +++ b/configure @@ -24,11 +24,5 @@ cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dyl make install-libLTLIBRARIES install-includeHEADERS -cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a -cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la -cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai -cp modules/oniguruma/src/.libs/libonig.4.dylib ${scriptdir}/build/deps/libonig.4.dylib -cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dylib - echo "finished building jq" popd &> /dev/null