Skip to content

Commit b822f29

Browse files
committed
versions
1 parent de2ac12 commit b822f29

File tree

21 files changed

+2797
-5305
lines changed

21 files changed

+2797
-5305
lines changed

PUBLISH.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The `generate-packages` script (`scripts/generate-version-packages.ts`):
7979
#### Build and Publish Individual Versions
8080
```bash
8181
# Navigate to a specific version directory
82-
cd packages/deparser/versions/17
82+
cd packages/deparser/versions/13
8383

8484
# Build the package
8585
npm run build
@@ -88,9 +88,18 @@ npm run build
8888
cd dist/
8989

9090
# Publish with the correct tag
91-
npm publish --tag pg17
91+
npm publish --tag pg13
92+
```
93+
94+
**I do 13,14,15,16... since 17 was already publish from the root `pnpm lerna publish`
95+
96+
Now go to run, fetch fresh versions for config again:
97+
98+
```
99+
pnpm bump-versions
92100
```
93101

102+
94103
#### Publish All Deparser Versions
95104
```bash
96105
cd packages/deparser

config/versions.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@
22
"versions": {
33
"13": {
44
"libpg-query": "13.6.0",
5-
"pgsql-parser": "13.19.0",
6-
"pgsql-deparser": "13.19.0",
5+
"pgsql-parser": "13.19.1",
6+
"pgsql-deparser": "13.19.1",
77
"@pgsql/types": "13.11.1",
88
"npmTag": "pg13"
99
},
1010
"14": {
1111
"libpg-query": "14.3.0",
12-
"pgsql-parser": "14.1.0",
13-
"pgsql-deparser": "14.1.0",
12+
"pgsql-parser": "14.1.1",
13+
"pgsql-deparser": "14.1.1",
1414
"@pgsql/types": "14.1.1",
1515
"npmTag": "pg14"
1616
},
1717
"15": {
1818
"libpg-query": "15.5.0",
19-
"pgsql-parser": "15.1.0",
20-
"pgsql-deparser": "15.1.0",
19+
"pgsql-parser": "15.1.1",
20+
"pgsql-deparser": "15.1.1",
2121
"@pgsql/types": "15.1.1",
2222
"npmTag": "pg15"
2323
},
2424
"16": {
2525
"libpg-query": "16.6.0",
26-
"pgsql-parser": "16.1.0",
27-
"pgsql-deparser": "16.1.0",
26+
"pgsql-parser": "16.1.1",
27+
"pgsql-deparser": "16.1.1",
2828
"@pgsql/types": "16.1.1",
2929
"npmTag": "pg16"
3030
},
3131
"17": {
3232
"libpg-query": "17.6.0",
33-
"pgsql-parser": "17.8.2",
34-
"pgsql-deparser": "17.11.1",
33+
"pgsql-parser": "17.8.3",
34+
"pgsql-deparser": "17.11.2",
3535
"@pgsql/types": "17.6.1",
3636
"npmTag": "pg17"
3737
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
"eslint-plugin-simple-import-sort": "^12.1.0",
3434
"eslint-plugin-unused-imports": "^4.0.0",
3535
"glob": "^11.0.0",
36+
"copyfiles": "^2.4.1",
37+
"rimraf": "^6.0.1",
3638
"jest": "^30.2.0",
3739
"jest-diff": "30.2.0",
3840
"lerna": "^8.2.4",

packages/deparser/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const sql2 = deparse(selectAst, { pretty: true });
131131
// active = true;
132132
```
133133

134-
For complete documentation and advanced options, see [DEPARSER_USAGE.md](../../DEPARSER_USAGE.md).
134+
For complete documentation and advanced options, see [DEPARSER_USAGE.md](https://github.com/constructive-io/pgsql-parser/tree/main/packages/deparser/DEPARSER_USAGE.md).
135135

136136
## Why Use `pgsql-deparser`?
137137

packages/deparser/scripts/generate-version-packages.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ function generateVersionPackages(): void {
129129
fs.writeFileSync(tsConfigEsmPath, JSON.stringify(tsConfigEsm, null, 2));
130130
console.log(` ✓ Created tsconfig.esm.json`);
131131

132-
132+
// Copy README.md with FOOTER.md appended
133+
const readmePath = path.join(process.cwd(), 'README.md');
134+
const footerPath = path.join(__dirname, '../../../FOOTER.md');
135+
const readmeContent = fs.readFileSync(readmePath, 'utf-8');
136+
const footerContent = fs.readFileSync(footerPath, 'utf-8');
137+
const combinedReadme = readmeContent + '\n' + footerContent;
138+
fs.writeFileSync(path.join(versionDir, 'README.md'), combinedReadme);
139+
console.log(` ✓ Created README.md with footer`);
133140

134141
console.log('');
135142
}

packages/parser/scripts/prepare-versions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ export * from '@pgsql/types';
117117
}, null, 2));
118118

119119

120-
// Copy the README.md files
121-
fs.copyFileSync(
122-
path.join(__dirname, '../README.md'),
123-
path.join(versionDir, 'README.md')
124-
);
120+
// Copy the README.md files with FOOTER.md appended
121+
const readmeContent = fs.readFileSync(path.join(__dirname, '../README.md'), 'utf-8');
122+
const footerContent = fs.readFileSync(path.join(__dirname, '../../../FOOTER.md'), 'utf-8');
123+
const combinedReadme = readmeContent + '\n' + footerContent;
124+
fs.writeFileSync(path.join(versionDir, 'README.md'), combinedReadme);
125125

126126
console.log(`✓ Generated PG${pgVersion} with libpg-query@${libpgQueryVersion} and pgsql-parser@${pgsqlParserVersion}`);
127127
});

packages/transform/src/13/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* This file was automatically generated by [email protected].1.
2+
* This file was automatically generated by [email protected].2.
33
* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file,
44
* and run the pg-proto-parser generate command to regenerate this file.
55
*/

packages/transform/src/13/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* This file was automatically generated by [email protected].1.
2+
* This file was automatically generated by [email protected].2.
33
* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file,
44
* and run the pg-proto-parser generate command to regenerate this file.
55
*/

packages/transform/src/14/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* This file was automatically generated by [email protected].1.
2+
* This file was automatically generated by [email protected].2.
33
* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file,
44
* and run the pg-proto-parser generate command to regenerate this file.
55
*/

packages/transform/src/14/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* This file was automatically generated by [email protected].1.
2+
* This file was automatically generated by [email protected].2.
33
* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file,
44
* and run the pg-proto-parser generate command to regenerate this file.
55
*/

0 commit comments

Comments
 (0)