Skip to content

Commit 81e9370

Browse files
committed
update workflows
1 parent f87e729 commit 81e9370

File tree

7 files changed

+231
-79
lines changed

7 files changed

+231
-79
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/npm/dt/libpg-query"></a>
99
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/npm/dw/libpg-query"/></a>
1010
<a href="https://github.com/launchql/libpg-query/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
11-
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/libpg-query-node"/></a>
11+
<a href="https://www.npmjs.com/package/libpg-query"><img height="20" src="https://img.shields.io/github/package-json/v/launchql/libpg-query-node"/></a><br />
12+
<a href="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-linux.yml">
13+
<img height="20" src="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-linux.yml/badge.svg" />
14+
</a>
15+
<a href="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-mac.yml">
16+
<img height="20" src="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-mac.yml/badge.svg" />
17+
</a>
18+
<a href="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-win.yml">
19+
<img height="20" src="https://github.com/launchql/libpg-query-node/actions/workflows/run-tests-win.yml/badge.svg" />
20+
</a>
21+
1222
</p>
1323

1424
The real PostgreSQL parser, exposed for nodejs.

docker-compose.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

docker/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
build the binary on mac
44

55
```sh
6+
rm -rf build
67
yarn
78
```
89

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@
3030
}
3131
},
3232
"scripts": {
33+
"clean": "rimraf build",
3334
"configure": "node-pre-gyp configure",
34-
"install": "node-pre-gyp install --fallback-to-build",
35-
"rebuild": "node-pre-gyp configure rebuild",
35+
"install": "node-pre-gyp install --fallback-to-build --loglevel verbose",
36+
"rebuild": "node-pre-gyp rebuild --loglevel verbose",
3637
"make:wasm": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
3738
"build:wasm": "yarn make:wasm build",
3839
"rebuild:wasm": "yarn make:wasm rebuild",
3940
"clean:wasm": "yarn make:wasm clean",
4041
"clean-cache:wasm": "yarn make:wasm clean-cache",
42+
"workflows": "node script/workflows.js",
4143
"test": "mocha --timeout 5000",
4244
"binary:build": "node-pre-gyp rebuild package",
4345
"binary:publish": "AWS_PROFILE=supabase-dev node-pre-gyp publish"
@@ -49,10 +51,12 @@
4951
"url": "git://github.com/launchql/libpg-query-node.git"
5052
},
5153
"devDependencies": {
54+
"@yamlize/cli": "^0.8.0",
5255
"chai": "^3.5.0",
5356
"emnapi": "^0.43.1",
5457
"lodash": "^4.17.15",
55-
"mocha": "^5.2.0"
58+
"mocha": "^5.2.0",
59+
"rimraf": "5.0.0"
5660
},
5761
"dependencies": {
5862
"@emnapi/runtime": "^0.43.1",
@@ -75,4 +79,4 @@
7579
"host": "https://supabase-public-artifacts-bucket.s3.amazonaws.com",
7680
"remote_path": "./libpg-query-node/"
7781
}
78-
}
82+
}

script/workflows.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const { exec } = require('child_process');
2+
const { join } = require('path');
3+
4+
// if (typeof process.argv[2] !== 'string') {
5+
// throw new Error('branchName not provided');
6+
// }
7+
8+
const yamldir = (s) => join(__dirname, '/../.yamlize/', s);
9+
const workflowDir = (s) => join(__dirname, '/../.github/workflows/', s);
10+
11+
const cmd = (config, workflow) => ([
12+
'yamlize',
13+
'--config',
14+
yamldir(`config/${config}`),
15+
16+
'--inFile',
17+
yamldir(`workflows/${workflow}`),
18+
19+
'--outFile',
20+
workflowDir(`generated-${workflow}`),
21+
].join(' '));
22+
23+
24+
exec(cmd('config.yaml', 'build-and-test.yaml'), (error, _stdout, _stderr) => {
25+
if (error) {
26+
console.error(`Error: ${error.message}`);
27+
return;
28+
}
29+
});

test/webpack/yarn.lock

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -458,21 +458,21 @@ binary-extensions@^2.0.0:
458458
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
459459
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
460460

461-
462-
version "1.20.1"
463-
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668"
464-
integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==
461+
462+
version "1.20.2"
463+
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd"
464+
integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==
465465
dependencies:
466466
bytes "3.1.2"
467-
content-type "~1.0.4"
467+
content-type "~1.0.5"
468468
debug "2.6.9"
469469
depd "2.0.0"
470470
destroy "1.2.0"
471471
http-errors "2.0.0"
472472
iconv-lite "0.4.24"
473473
on-finished "2.4.1"
474474
qs "6.11.0"
475-
raw-body "2.5.1"
475+
raw-body "2.5.2"
476476
type-is "~1.6.18"
477477
unpipe "1.0.0"
478478

@@ -621,7 +621,7 @@ [email protected]:
621621
dependencies:
622622
safe-buffer "5.2.1"
623623

624-
content-type@~1.0.4:
624+
content-type@~1.0.4, content-type@~1.0.5:
625625
version "1.0.5"
626626
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918"
627627
integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
@@ -631,10 +631,10 @@ [email protected]:
631631
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
632632
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
633633

634-
cookie@0.5.0:
635-
version "0.5.0"
636-
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
637-
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
634+
cookie@0.6.0:
635+
version "0.6.0"
636+
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
637+
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
638638

639639
core-util-is@~1.0.0:
640640
version "1.0.3"
@@ -816,16 +816,16 @@ execa@^5.0.0:
816816
strip-final-newline "^2.0.0"
817817

818818
express@^4.17.3:
819-
version "4.18.2"
820-
resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
821-
integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==
819+
version "4.19.2"
820+
resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465"
821+
integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==
822822
dependencies:
823823
accepts "~1.3.8"
824824
array-flatten "1.1.1"
825-
body-parser "1.20.1"
825+
body-parser "1.20.2"
826826
content-disposition "0.5.4"
827827
content-type "~1.0.4"
828-
cookie "0.5.0"
828+
cookie "0.6.0"
829829
cookie-signature "1.0.6"
830830
debug "2.6.9"
831831
depd "2.0.0"
@@ -908,9 +908,9 @@ flat@^5.0.2:
908908
integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
909909

910910
follow-redirects@^1.0.0:
911-
version "1.15.3"
912-
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
913-
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==
911+
version "1.15.6"
912+
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
913+
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
914914

915915
916916
version "0.2.0"
@@ -1550,10 +1550,10 @@ range-parser@^1.2.1, range-parser@~1.2.1:
15501550
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
15511551
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
15521552

1553-
1554-
version "2.5.1"
1555-
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"
1556-
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
1553+
1554+
version "2.5.2"
1555+
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
1556+
integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==
15571557
dependencies:
15581558
bytes "3.1.2"
15591559
http-errors "2.0.0"
@@ -2010,9 +2010,9 @@ webpack-cli@^5.1.4:
20102010
webpack-merge "^5.7.3"
20112011

20122012
webpack-dev-middleware@^5.3.1:
2013-
version "5.3.3"
2014-
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f"
2015-
integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==
2013+
version "5.3.4"
2014+
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517"
2015+
integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==
20162016
dependencies:
20172017
colorette "^2.0.10"
20182018
memfs "^3.4.3"

0 commit comments

Comments
 (0)