Skip to content

Commit b903339

Browse files
authored
Merge pull request #73 from kibae/ci/node-22-24-support
ci: Update Node.js version requirements - Add support for Node.js 22 and 24 - Increase minimum required Node.js version from 14 to 16 - Update package.json engines field to reflect new version requirements
2 parents dbe7be9 + 3cbcf0c commit b903339

File tree

6 files changed

+30
-42
lines changed

6 files changed

+30
-42
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches: [ "main" ]
99
pull_request:
10-
branches: [ "main" ]
1110

1211
permissions:
1312
checks: write
@@ -20,7 +19,7 @@ jobs:
2019

2120
strategy:
2221
matrix:
23-
node-version: [14, 16, 18, 20, 22, 24]
22+
node-version: [16, 18, 20, 22, 24]
2423

2524
services:
2625
postgres:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pg-logical-replication
2-
- [PostgreSQL Logical Replication](https://www.postgresql.org/docs/current/logical-replication.html) client for node.js
2+
- [PostgreSQL Logical Replication](https://www.postgresql.org/docs/current/logical-replication.html) client for node.js(`>=16.9.0`)
33
- Supported plugins
44
- [pgoutput](https://www.postgresql.org/docs/current/protocol-logicalrep-message-formats.html) (Native to PostgreSQL, Recommended)
55
- Use the pgoutput plugin to process huge transactions.

jest.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
moduleFileExtensions: ['js', 'json', 'ts'],
3+
rootDir: '.',
4+
testRegex: '.*\\.spec\\.ts$',
5+
transform: {
6+
'^.+\\.(t|j)s$': 'ts-jest',
7+
},
8+
collectCoverageFrom: ['**/*.(t|j)s'],
9+
testEnvironment: 'node',
10+
roots: ['<rootDir>/src/'],
11+
reporters: ['default', 'jest-junit'],
12+
maxConcurrency: 1,
13+
maxWorkers: 1,
14+
moduleNameMapper: {
15+
'^(\\.{1,2}/.*)\\.js$': '$1',
16+
}
17+
};

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-logical-replication",
3-
"version": "2.0.7",
3+
"version": "2.1.0",
44
"description": "PostgreSQL Location Replication client - logical WAL replication streaming",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -91,34 +91,6 @@
9191
},
9292
"license": "MIT",
9393
"engines": {
94-
"node": ">= 14.0.0"
95-
},
96-
"jest": {
97-
"moduleFileExtensions": [
98-
"js",
99-
"json",
100-
"ts"
101-
],
102-
"rootDir": ".",
103-
"testRegex": ".*\\.spec\\.ts$",
104-
"transform": {
105-
"^.+\\.(t|j)s$": "ts-jest"
106-
},
107-
"collectCoverageFrom": [
108-
"**/*.(t|j)s"
109-
],
110-
"testEnvironment": "node",
111-
"roots": [
112-
"<rootDir>/src/"
113-
],
114-
"reporters": [
115-
"default",
116-
"jest-junit"
117-
],
118-
"maxConcurrency": 1,
119-
"maxWorkers": 1,
120-
"moduleNameMapper": {
121-
"^(\\.{1,2}/.*)\\.js$": "$1"
122-
}
94+
"node": ">=16.9.0"
12395
}
12496
}

tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1212

1313
/* Language and Environment */
14-
"target": "ES2020", // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-14
14+
"target": "ES2022", // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-14
1515
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
16-
"lib": ["ES2020"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16+
"lib": ["ES2022"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
1717
// "jsx": "preserve", /* Specify what JSX code is generated. */
1818
"experimentalDecorators": true,
1919
/* Enable experimental support for TC39 stage 2 draft decorators. */
@@ -28,10 +28,10 @@
2828
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2929

3030
/* Modules */
31-
"module": "Node16",
31+
"module": "NodeNext",
3232
/* Specify what module code is generated. */
3333
// "rootDir": "./", /* Specify the root folder within your source files. */
34-
"moduleResolution": "Node16" /* Specify how TypeScript looks up a file from a given module specifier. */,
34+
"moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
3535
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
3636
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3737
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
@@ -73,7 +73,7 @@
7373
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
7474

7575
/* Interop Constraints */
76-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
76+
"isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7777
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
7878
"esModuleInterop": true,
7979
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */

0 commit comments

Comments
 (0)