Skip to content

Commit

Permalink
CI clean up to fix lint task and remove Windows / MacOS from matrix (#…
Browse files Browse the repository at this point in the history
…3122)

* Remove unused travis CI config

* Bump eslint and friends

* Fix lint errors after eslint upgrade

* Remove windows and macos from CI workflow as they are actually running linux

Removes the windows and macos matrix from the CI workflow as they were never actually setting
the OS. Both were running against the "ubuntu-latest" OS. Trying to actually use them would
not work either as neither windows or macos is supported for service containers. A different
means will be needed to test on those platforms. Until that's done, this removes those from
the matrix as we were simply running the same thing 3x for the same node versions.
  • Loading branch information
sehrope authored Mar 5, 2024
1 parent 2a8efbe commit b4bfd63
Show file tree
Hide file tree
Showing 6 changed files with 499 additions and 478 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- run: yarn lint
build:
needs: lint
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
Expand All @@ -35,9 +34,16 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
node: ['10', '12', '14', '16', '18']
os: [ubuntu-latest, windows-latest, macos-latest]
node:
- '10'
- '12'
- '14'
- '16'
- '18'
os:
- ubuntu-latest
name: Node.js ${{ matrix.node }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
PGUSER: postgres
PGHOST: localhost
Expand All @@ -47,6 +53,9 @@ jobs:
SCRAM_TEST_PGUSER: scram_test
SCRAM_TEST_PGPASSWORD: test4scram
steps:
- name: Show OS
run: |
uname -a
- run: |
psql \
-c "SET password_encryption = 'scram-sha-256'" \
Expand Down
100 changes: 0 additions & 100 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"lint": "eslint '*/**/*.{js,ts,tsx}'"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"eslint": "^7.11.0",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-prettier": "^5.1.2",
"lerna": "^3.19.0",
"prettier": "3.0.3",
"typescript": "^4.0.3"
Expand Down
6 changes: 0 additions & 6 deletions packages/pg-connection-string/.travis.yml

This file was deleted.

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
Loading

0 comments on commit b4bfd63

Please sign in to comment.