Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build - package version upgrade for build/lint related packages. #3157

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
node: ['10', '12', '14', '16', '18']
node: ['14', '16', '18', '20']
os: [ubuntu-latest, windows-latest, macos-latest]
name: Node.js ${{ matrix.node }} (${{ matrix.os }})
env:
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"docs:start": "cd docs && yarn start",
"pretest": "yarn build",
"prepublish": "yarn build",
"lint": "eslint '*/**/*.{js,ts,tsx}'"
"lint": "eslint 'packages/**/*.{js,ts,tsx}'"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"lerna": "^3.19.0",
"prettier": "3.0.3",
"typescript": "^4.0.3"
"typescript": "5.3.3"
},
"prettier": {
"semi": false,
Expand Down
52 changes: 42 additions & 10 deletions packages/pg-protocol/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,21 @@ export class DatabaseError extends Error implements NoticeOrError {
public file: string | undefined
public line: string | undefined
public routine: string | undefined
constructor(message: string, public readonly length: number, public readonly name: MessageName) {
constructor(
message: string,
public readonly length: number,
public readonly name: MessageName
) {
super(message)
}
}

export class CopyDataMessage {
public readonly name = 'copyData'
constructor(public readonly length: number, public readonly chunk: Buffer) {}
constructor(
public readonly length: number,
public readonly chunk: Buffer
) {}
}

export class CopyResponse {
Expand Down Expand Up @@ -148,15 +155,21 @@ export class Field {
export class RowDescriptionMessage {
public readonly name: MessageName = 'rowDescription'
public readonly fields: Field[]
constructor(public readonly length: number, public readonly fieldCount: number) {
constructor(
public readonly length: number,
public readonly fieldCount: number
) {
this.fields = new Array(this.fieldCount)
}
}

export class ParameterDescriptionMessage {
public readonly name: MessageName = 'parameterDescription'
public readonly dataTypeIDs: number[]
constructor(public readonly length: number, public readonly parameterCount: number) {
constructor(
public readonly length: number,
public readonly parameterCount: number
) {
this.dataTypeIDs = new Array(this.parameterCount)
}
}
Expand All @@ -172,12 +185,19 @@ export class ParameterStatusMessage {

export class AuthenticationMD5Password implements BackendMessage {
public readonly name: MessageName = 'authenticationMD5Password'
constructor(public readonly length: number, public readonly salt: Buffer) {}
constructor(
public readonly length: number,
public readonly salt: Buffer
) {}
}

export class BackendKeyDataMessage {
public readonly name: MessageName = 'backendKeyData'
constructor(public readonly length: number, public readonly processID: number, public readonly secretKey: number) {}
constructor(
public readonly length: number,
public readonly processID: number,
public readonly secretKey: number
) {}
}

export class NotificationResponseMessage {
Expand All @@ -192,24 +212,36 @@ export class NotificationResponseMessage {

export class ReadyForQueryMessage {
public readonly name: MessageName = 'readyForQuery'
constructor(public readonly length: number, public readonly status: string) {}
constructor(
public readonly length: number,
public readonly status: string
) {}
}

export class CommandCompleteMessage {
public readonly name: MessageName = 'commandComplete'
constructor(public readonly length: number, public readonly text: string) {}
constructor(
public readonly length: number,
public readonly text: string
) {}
}

export class DataRowMessage {
public readonly fieldCount: number
public readonly name: MessageName = 'dataRow'
constructor(public length: number, public fields: any[]) {
constructor(
public length: number,
public fields: any[]
) {
this.fieldCount = fields.length
}
}

export class NoticeMessage implements BackendMessage, NoticeOrError {
constructor(public readonly length: number, public readonly message: string | undefined) {}
constructor(
public readonly length: number,
public readonly message: string | undefined
) {}
public readonly name = 'notice'
public severity: string | undefined
public code: string | undefined
Expand Down