Skip to content

Commit 41bb6ad

Browse files
refactor: update package.json files to use Docker-based build pattern
- Move root package.json functionality to libpg-query-full (PG17) - Replace root with workspace coordinator package.json - Update all version packages to use Docker-based wasm:make scripts - Standardize exports, files, and dependency configurations - Lightweight versions exclude proto.js from files array - Version-specific @pgsql/types dependencies configured correctly Co-Authored-By: Dan Lynch <[email protected]>
1 parent 410d9da commit 41bb6ad

File tree

7 files changed

+280
-158
lines changed

7 files changed

+280
-158
lines changed

libpg-query-13/package.json

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,57 @@
22
"name": "libpg-query-13",
33
"version": "13.2.0",
44
"description": "PostgreSQL 13 query parser (lightweight - no deparse/scan)",
5-
"main": "wasm/index.js",
6-
"types": "wasm/index.d.ts",
7-
"type": "module",
5+
"homepage": "https://github.com/launchql/libpg-query-node",
6+
"main": "./wasm/index.cjs",
7+
"typings": "./wasm/index.d.ts",
8+
"publishConfig": {
9+
"access": "public"
10+
},
11+
"files": [
12+
"wasm/*"
13+
],
814
"exports": {
915
".": {
16+
"types": "./wasm/index.d.ts",
1017
"import": "./wasm/index.js",
11-
"types": "./wasm/index.d.ts"
18+
"require": "./wasm/index.cjs"
1219
}
1320
},
14-
"files": [
15-
"wasm/",
16-
"README.md"
17-
],
1821
"scripts": {
19-
"build": "EMSCRIPTEN=1 make build",
20-
"clean": "make clean",
22+
"clean": "yarn wasm:clean && rimraf cjs esm",
23+
"build:js": "node scripts/build.js",
24+
"build": "yarn clean; yarn wasm:build; yarn build:js",
25+
"wasm:make": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
26+
"wasm:build": "yarn wasm:make build",
27+
"wasm:rebuild": "yarn wasm:make rebuild",
28+
"wasm:clean": "yarn wasm:make clean",
29+
"wasm:clean-cache": "yarn wasm:make clean-cache",
2130
"test": "mocha test/*.test.js --timeout 5000"
2231
},
23-
"dependencies": {
24-
"@pgsql/types": "^13.0.0"
32+
"author": "Dan Lynch <[email protected]> (http://github.com/pyramation)",
33+
"license": "LICENSE IN LICENSE",
34+
"repository": {
35+
"type": "git",
36+
"url": "git://github.com/launchql/libpg-query-node.git"
2537
},
2638
"devDependencies": {
27-
"chai": "^4.3.7",
28-
"mocha": "^10.2.0"
39+
"@launchql/proto-cli": "1.25.0",
40+
"@yamlize/cli": "^0.8.0",
41+
"chai": "^3.5.0",
42+
"mocha": "^11.7.0",
43+
"rimraf": "5.0.0",
44+
"typescript": "^5.3.3"
45+
},
46+
"dependencies": {
47+
"@pgsql/types": "^13.0.0"
2948
},
30-
"keywords": ["postgresql", "parser", "sql", "pg13"],
31-
"author": "Dan Lynch",
32-
"license": "MIT"
49+
"keywords": [
50+
"sql",
51+
"postgres",
52+
"postgresql",
53+
"pg",
54+
"query",
55+
"plpgsql",
56+
"database"
57+
]
3358
}

libpg-query-14/package.json

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,57 @@
22
"name": "libpg-query-14",
33
"version": "14.3.0",
44
"description": "PostgreSQL 14 query parser (lightweight - no deparse/scan)",
5-
"main": "wasm/index.js",
6-
"types": "wasm/index.d.ts",
7-
"type": "module",
5+
"homepage": "https://github.com/launchql/libpg-query-node",
6+
"main": "./wasm/index.cjs",
7+
"typings": "./wasm/index.d.ts",
8+
"publishConfig": {
9+
"access": "public"
10+
},
11+
"files": [
12+
"wasm/*"
13+
],
814
"exports": {
915
".": {
16+
"types": "./wasm/index.d.ts",
1017
"import": "./wasm/index.js",
11-
"types": "./wasm/index.d.ts"
18+
"require": "./wasm/index.cjs"
1219
}
1320
},
14-
"files": [
15-
"wasm/",
16-
"README.md"
17-
],
1821
"scripts": {
19-
"build": "EMSCRIPTEN=1 make build",
20-
"clean": "make clean",
22+
"clean": "yarn wasm:clean && rimraf cjs esm",
23+
"build:js": "node scripts/build.js",
24+
"build": "yarn clean; yarn wasm:build; yarn build:js",
25+
"wasm:make": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
26+
"wasm:build": "yarn wasm:make build",
27+
"wasm:rebuild": "yarn wasm:make rebuild",
28+
"wasm:clean": "yarn wasm:make clean",
29+
"wasm:clean-cache": "yarn wasm:make clean-cache",
2130
"test": "mocha test/*.test.js --timeout 5000"
2231
},
23-
"dependencies": {
24-
"@pgsql/types": "^14.0.0"
32+
"author": "Dan Lynch <[email protected]> (http://github.com/pyramation)",
33+
"license": "LICENSE IN LICENSE",
34+
"repository": {
35+
"type": "git",
36+
"url": "git://github.com/launchql/libpg-query-node.git"
2537
},
2638
"devDependencies": {
27-
"chai": "^4.3.7",
28-
"mocha": "^10.2.0"
39+
"@launchql/proto-cli": "1.25.0",
40+
"@yamlize/cli": "^0.8.0",
41+
"chai": "^3.5.0",
42+
"mocha": "^11.7.0",
43+
"rimraf": "5.0.0",
44+
"typescript": "^5.3.3"
45+
},
46+
"dependencies": {
47+
"@pgsql/types": "^14.0.0"
2948
},
30-
"keywords": ["postgresql", "parser", "sql", "pg14"],
31-
"author": "Dan Lynch",
32-
"license": "MIT"
49+
"keywords": [
50+
"sql",
51+
"postgres",
52+
"postgresql",
53+
"pg",
54+
"query",
55+
"plpgsql",
56+
"database"
57+
]
3358
}

libpg-query-15/package.json

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,57 @@
22
"name": "libpg-query-15",
33
"version": "15.4.2",
44
"description": "PostgreSQL 15 query parser (lightweight - no deparse/scan)",
5-
"main": "wasm/index.js",
6-
"types": "wasm/index.d.ts",
7-
"type": "module",
5+
"homepage": "https://github.com/launchql/libpg-query-node",
6+
"main": "./wasm/index.cjs",
7+
"typings": "./wasm/index.d.ts",
8+
"publishConfig": {
9+
"access": "public"
10+
},
11+
"files": [
12+
"wasm/*"
13+
],
814
"exports": {
915
".": {
16+
"types": "./wasm/index.d.ts",
1017
"import": "./wasm/index.js",
11-
"types": "./wasm/index.d.ts"
18+
"require": "./wasm/index.cjs"
1219
}
1320
},
14-
"files": [
15-
"wasm/",
16-
"README.md"
17-
],
1821
"scripts": {
19-
"build": "EMSCRIPTEN=1 make build",
20-
"clean": "make clean",
22+
"clean": "yarn wasm:clean && rimraf cjs esm",
23+
"build:js": "node scripts/build.js",
24+
"build": "yarn clean; yarn wasm:build; yarn build:js",
25+
"wasm:make": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
26+
"wasm:build": "yarn wasm:make build",
27+
"wasm:rebuild": "yarn wasm:make rebuild",
28+
"wasm:clean": "yarn wasm:make clean",
29+
"wasm:clean-cache": "yarn wasm:make clean-cache",
2130
"test": "mocha test/*.test.js --timeout 5000"
2231
},
23-
"dependencies": {
24-
"@pgsql/types": "^15.0.0"
32+
"author": "Dan Lynch <[email protected]> (http://github.com/pyramation)",
33+
"license": "LICENSE IN LICENSE",
34+
"repository": {
35+
"type": "git",
36+
"url": "git://github.com/launchql/libpg-query-node.git"
2537
},
2638
"devDependencies": {
27-
"chai": "^4.3.7",
28-
"mocha": "^10.2.0"
39+
"@launchql/proto-cli": "1.25.0",
40+
"@yamlize/cli": "^0.8.0",
41+
"chai": "^3.5.0",
42+
"mocha": "^11.7.0",
43+
"rimraf": "5.0.0",
44+
"typescript": "^5.3.3"
45+
},
46+
"dependencies": {
47+
"@pgsql/types": "^15.0.0"
2948
},
30-
"keywords": ["postgresql", "parser", "sql", "pg15"],
31-
"author": "Dan Lynch",
32-
"license": "MIT"
49+
"keywords": [
50+
"sql",
51+
"postgres",
52+
"postgresql",
53+
"pg",
54+
"query",
55+
"plpgsql",
56+
"database"
57+
]
3358
}

libpg-query-16/package.json

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,57 @@
22
"name": "libpg-query-16",
33
"version": "16.5.2",
44
"description": "PostgreSQL 16 query parser (lightweight - no deparse/scan)",
5-
"main": "wasm/index.js",
6-
"types": "wasm/index.d.ts",
7-
"type": "module",
5+
"homepage": "https://github.com/launchql/libpg-query-node",
6+
"main": "./wasm/index.cjs",
7+
"typings": "./wasm/index.d.ts",
8+
"publishConfig": {
9+
"access": "public"
10+
},
11+
"files": [
12+
"wasm/*"
13+
],
814
"exports": {
915
".": {
16+
"types": "./wasm/index.d.ts",
1017
"import": "./wasm/index.js",
11-
"types": "./wasm/index.d.ts"
18+
"require": "./wasm/index.cjs"
1219
}
1320
},
14-
"files": [
15-
"wasm/",
16-
"README.md"
17-
],
1821
"scripts": {
19-
"build": "EMSCRIPTEN=1 make build",
20-
"clean": "make clean",
22+
"clean": "yarn wasm:clean && rimraf cjs esm",
23+
"build:js": "node scripts/build.js",
24+
"build": "yarn clean; yarn wasm:build; yarn build:js",
25+
"wasm:make": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
26+
"wasm:build": "yarn wasm:make build",
27+
"wasm:rebuild": "yarn wasm:make rebuild",
28+
"wasm:clean": "yarn wasm:make clean",
29+
"wasm:clean-cache": "yarn wasm:make clean-cache",
2130
"test": "mocha test/*.test.js --timeout 5000"
2231
},
23-
"dependencies": {
24-
"@pgsql/types": "^16.0.0"
32+
"author": "Dan Lynch <[email protected]> (http://github.com/pyramation)",
33+
"license": "LICENSE IN LICENSE",
34+
"repository": {
35+
"type": "git",
36+
"url": "git://github.com/launchql/libpg-query-node.git"
2537
},
2638
"devDependencies": {
27-
"chai": "^4.3.7",
28-
"mocha": "^10.2.0"
39+
"@launchql/proto-cli": "1.25.0",
40+
"@yamlize/cli": "^0.8.0",
41+
"chai": "^3.5.0",
42+
"mocha": "^11.7.0",
43+
"rimraf": "5.0.0",
44+
"typescript": "^5.3.3"
45+
},
46+
"dependencies": {
47+
"@pgsql/types": "^16.0.0"
2948
},
30-
"keywords": ["postgresql", "parser", "sql", "pg16"],
31-
"author": "Dan Lynch",
32-
"license": "MIT"
49+
"keywords": [
50+
"sql",
51+
"postgres",
52+
"postgresql",
53+
"pg",
54+
"query",
55+
"plpgsql",
56+
"database"
57+
]
3358
}

libpg-query-full/package.json

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,62 @@
11
{
22
"name": "libpg-query-full",
3-
"version": "17.6.1",
4-
"description": "PostgreSQL 17 query parser (full functionality with deparse/scan)",
5-
"main": "wasm/index.js",
6-
"types": "wasm/index.d.ts",
7-
"type": "module",
3+
"version": "17.2.0",
4+
"description": "The real PostgreSQL query parser (PostgreSQL 17 - full functionality)",
5+
"homepage": "https://github.com/launchql/libpg-query-node",
6+
"main": "./wasm/index.cjs",
7+
"typings": "./wasm/index.d.ts",
8+
"publishConfig": {
9+
"access": "public"
10+
},
11+
"files": [
12+
"wasm/*",
13+
"proto.js"
14+
],
815
"exports": {
916
".": {
17+
"types": "./wasm/index.d.ts",
1018
"import": "./wasm/index.js",
11-
"types": "./wasm/index.d.ts"
19+
"require": "./wasm/index.cjs"
1220
}
1321
},
14-
"files": [
15-
"wasm/",
16-
"proto.js",
17-
"README.md"
18-
],
1922
"scripts": {
20-
"build": "EMSCRIPTEN=1 make build",
21-
"clean": "make clean",
23+
"clean": "yarn wasm:clean && rimraf cjs esm",
24+
"build:js": "node scripts/build.js",
25+
"build": "yarn clean; yarn wasm:build; yarn build:js",
26+
"wasm:make": "docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake make",
27+
"wasm:build": "yarn wasm:make build",
28+
"wasm:rebuild": "yarn wasm:make rebuild",
29+
"wasm:clean": "yarn wasm:make clean",
30+
"wasm:clean-cache": "yarn wasm:make clean-cache",
2231
"test": "mocha test/*.test.js --timeout 5000",
32+
"yamlize": "node ./scripts/yamlize.js",
2333
"protogen": "node ./scripts/protogen.js"
2434
},
35+
"author": "Dan Lynch <[email protected]> (http://github.com/pyramation)",
36+
"license": "LICENSE IN LICENSE",
37+
"repository": {
38+
"type": "git",
39+
"url": "git://github.com/launchql/libpg-query-node.git"
40+
},
41+
"devDependencies": {
42+
"@launchql/proto-cli": "1.25.0",
43+
"@yamlize/cli": "^0.8.0",
44+
"chai": "^3.5.0",
45+
"mocha": "^11.7.0",
46+
"rimraf": "5.0.0",
47+
"typescript": "^5.3.3"
48+
},
2549
"dependencies": {
2650
"@pgsql/types": "^17.0.0",
2751
"@launchql/protobufjs": "7.2.6"
2852
},
29-
"devDependencies": {
30-
"chai": "^4.3.7",
31-
"mocha": "^10.2.0",
32-
"pg-proto-parser": "^0.6.3"
33-
},
34-
"keywords": ["postgresql", "parser", "sql", "pg17", "deparse", "scan"],
35-
"author": "Dan Lynch",
36-
"license": "MIT"
53+
"keywords": [
54+
"sql",
55+
"postgres",
56+
"postgresql",
57+
"pg",
58+
"query",
59+
"plpgsql",
60+
"database"
61+
]
3762
}

0 commit comments

Comments
 (0)