Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
refs:
- &container
docker:
- image: node:20
- image: node:24
environment:
PG_URL: 'postgres://test-user@localhost:5432/test-db'
MYSQL_URL: 'mysql://test-user:password@localhost:3306/test-db'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows-src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
interpolate,
} from 'github-actions-workflow-builder/expression';

const DEFAULT_NODE_VERSION = '20.x';
const ALL_NODE_VERSIONS = ['18.x', '20.x', '22.x'];
const INTEGRATION_TEST_NODE_VERSIONS = ['18.x', '22.x'];
const DEFAULT_NODE_VERSION = '24.x';
const ALL_NODE_VERSIONS = ['20.x', '22.x', '24.x'];
const INTEGRATION_TEST_NODE_VERSIONS = ['22.x', '24.x'];

export function yarnInstallWithCache(nodeVersion: Expression<string>): Steps {
return ({use, run}) => {
Expand Down Expand Up @@ -175,7 +175,7 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {
const {node, mysql} = setBuildMatrix(
{
node: INTEGRATION_TEST_NODE_VERSIONS,
mysql: ['5.6.51', '5.7.33', '8.0.23'],
mysql: ['5.6.51', '5.7.33', '8.0.23', '9.6.0'],
},
{failFast: false},
);
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: 24.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -30,7 +30,7 @@ jobs:
${{ steps.step_3.outputs.dir }}
node_modules
packages/*/node_modules
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
key: ${{ runner.os }}-24.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -163,9 +163,9 @@ jobs:
strategy:
matrix:
node:
- 18.x
- 20.x
- 22.x
- 24.x
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -198,8 +198,8 @@ jobs:
strategy:
matrix:
node:
- 18.x
- 22.x
- 24.x
pg:
- 10.14-alpine
- 11.9-alpine
Expand Down Expand Up @@ -240,12 +240,13 @@ jobs:
strategy:
matrix:
node:
- 18.x
- 22.x
- 24.x
mysql:
- 5.6.51
- 5.7.33
- 8.0.23
- 9.6.0
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -279,7 +280,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: 24.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -291,7 +292,7 @@ jobs:
${{ steps.step_3.outputs.dir }}
node_modules
packages/*/node_modules
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
key: ${{ runner.os }}-24.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- run: yarn prettier:check
lint:
Expand All @@ -302,7 +303,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: 24.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -314,7 +315,7 @@ jobs:
${{ steps.step_3.outputs.dir }}
node_modules
packages/*/node_modules
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
key: ${{ runner.os }}-24.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- name: "Load output: ${{ fromJSON(needs.build.outputs.output) }}"
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
node-version: 24.x
registry-url: https://registry.npmjs.org
- name: Get yarn cache directory path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand All @@ -30,7 +30,7 @@ jobs:
${{ steps.step_3.outputs.dir }}
node_modules
packages/*/node_modules
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
key: ${{ runner.os }}-24.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v4
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"prettier:check": "prettier --list-different \"packages/*/src/**/*.{ts,tsx}\"",
"prettier:write": "prettier --write \"packages/*/src/**/*.{ts,tsx}\"",
"pretest": "yarn build",
"test": "TZ=Australia/Adelaide jest --selectProjects node --selectProjects pg --selectProjects mysql",
"test:node": "TZ=Australia/Adelaide jest --selectProjects node",
"test:pg": "TZ=Australia/Adelaide jest --selectProjects pg",
"test:mysql": "TZ=Australia/Adelaide jest --selectProjects mysql",
"test:mysql:5.6": "MYSQL_TEST_IMAGE=mysql:5.6.51 TZ=Australia/Adelaide jest --selectProjects mysql",
"test:mysql:5.7": "MYSQL_TEST_IMAGE=mysql:5.7.33 TZ=Australia/Adelaide jest --selectProjects mysql",
"test:bigquery": "TZ=Australia/Adelaide jest --selectProjects bigquery",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" TZ=Australia/Adelaide jest --selectProjects node --selectProjects pg --selectProjects mysql",
"test:node": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" TZ=Australia/Adelaide jest --selectProjects node",
"test:pg": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" TZ=Australia/Adelaide jest --selectProjects pg",
"test:mysql": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" TZ=Australia/Adelaide jest --selectProjects mysql",
"test:mysql:5.6": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" MYSQL_TEST_IMAGE=mysql:5.6.51 TZ=Australia/Adelaide jest --selectProjects mysql",
"test:mysql:5.7": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" MYSQL_TEST_IMAGE=mysql:5.7.33 TZ=Australia/Adelaide jest --selectProjects mysql",
"test:bigquery": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" TZ=Australia/Adelaide jest --selectProjects bigquery",
"posttest": "wsrun --parallel --exclude-missing test",
"watch:jest": "jest --watch",
"watch:jest": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --watch",
"clean": "rimraf packages/*/lib && rimraf packages/*/.last_build && rimraf packages/*/.cache && rimraf packages/*/build && rimraf packages/*/node_modules && rimraf node_modules",
"tslint": "tslint './packages/*/src/**/*.{js,jsx,ts,tsx}' -t verbose -p ."
},
Expand All @@ -50,6 +50,7 @@
},
{
"displayName": "bigquery",
"testEnvironment": "node",
"testRegex": "/__tests__/.+\\.test\\.bigquery\\.(tsx?)$",
"preset": "ts-jest"
}
Expand All @@ -58,15 +59,15 @@
"dependencies": {
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@types/jest": "^26.0.15",
"@types/jest": "^30.0.0",
"@types/node": "^14.14.25",
"cross-spawn": "^7.0.2",
"github-actions-workflow-builder": "^4.0.1",
"jest": "^26.6.1",
"jest": "^30.3.0",
"lsr": "^2.0.0",
"mkdirp": "^1.0.4",
"prettier": "^2.0.5",
"ts-jest": "^26.4.2",
"ts-jest": "^29.4.6",
"tslint": "^6.1.1",
"typescript": "^4.1.2",
"wsrun": "^5.2.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/bigquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"@databases/escape-identifier": "^0.0.0",
"@databases/split-sql-query": "^0.0.0",
"@databases/sql": "^0.0.0",
"@google-cloud/bigquery": "^7.7.1",
"@google-cloud/bigquery": "^8.1.1",
"@types/big.js": "^6.1.1",
"assert-never": "^1.2.1",
"big.js": "^6.0.0"
"big.js": "^6.2.2"
},
"scripts": {},
"repository": "https://github.com/ForbesLindesay/atdatabases/tree/master/packages/bigquery",
Expand Down
20 changes: 10 additions & 10 deletions packages/bigquery/src/__tests__/index.test.bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,24 @@ test(`simple query`, async () => {
the_timestamp: r.the_timestamp.value,
})),
).toMatchInlineSnapshot(`
Array [
Object {
[
{
"decimal_number": "3.14",
"id": "1",
"the_date": "2000-06-03",
"the_date_time": "2000-06-03T06:14:00",
"the_time": "04:41:00",
"the_timestamp": "2000-06-03T00:00:00.000Z",
},
Object {
{
"decimal_number": "3.14",
"id": "2",
"the_date": "2000-06-03",
"the_date_time": "2000-06-03T06:14:00",
"the_time": "04:41:00",
"the_timestamp": "2000-06-03T00:00:00.000Z",
},
Object {
{
"decimal_number": "3.14",
"id": "3",
"the_date": "2000-06-03",
Expand Down Expand Up @@ -279,24 +279,24 @@ test(`simple query on dataset`, async () => {
the_timestamp: r.the_timestamp.value,
})),
).toMatchInlineSnapshot(`
Array [
Object {
[
{
"decimal_number": "3.14",
"id": "1",
"the_date": "2000-06-03",
"the_date_time": "2000-06-03T06:14:00",
"the_time": "04:41:00",
"the_timestamp": "2000-06-03T00:00:00.000Z",
},
Object {
{
"decimal_number": "3.14",
"id": "2",
"the_date": "2000-06-03",
"the_date_time": "2000-06-03T06:14:00",
"the_time": "04:41:00",
"the_timestamp": "2000-06-03T00:00:00.000Z",
},
Object {
{
"decimal_number": "3.14",
"id": "3",
"the_date": "2000-06-03",
Expand Down Expand Up @@ -326,8 +326,8 @@ test(`query with parameter`, async () => {
the_timestamp: r.the_timestamp.value,
})),
).toMatchInlineSnapshot(`
Array [
Object {
[
{
"decimal_number": "3.14",
"id": "2",
"the_date": "2000-06-03",
Expand Down
2 changes: 1 addition & 1 deletion packages/mysql-config/src/MySqlConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const TestConfigSchema: ft.Runtype<TestConfig> = ft
.Object({
debug: withDefault(ft.Boolean, false),
migrationsScript: ft.Union(ft.String, ft.Array(ft.String), ft.Undefined),
image: withDefault(ft.String, `mysql:8.0.23`),
image: withDefault(ft.String, `mysql:9.6.0`),
containerName: withDefault(ft.String, `mysql-test`),
connectTimeoutSeconds: withDefault(integer({min: 0}), 20),
port: withDefault(integer({min: 0, max: 65535}), undefined),
Expand Down
8 changes: 4 additions & 4 deletions packages/mysql-config/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('get root config', () => {
connectTimeoutSeconds: 20,
containerName: 'mysql-test',
debug: false,
image: 'mysql:8.0.23',
image: 'mysql:9.6.0',
mySqlDb: 'test-db',
mySqlPassword: 'password',
mySqlUser: 'test-user',
Expand All @@ -23,7 +23,7 @@ test('valid config', () => {
connectTimeoutSeconds: 20,
containerName: 'mysql-test',
debug: false,
image: 'mysql:8.0.23',
image: 'mysql:9.6.0',
mySqlDb: 'test-db',
mySqlPassword: 'password',
mySqlUser: 'test-user',
Expand All @@ -36,7 +36,7 @@ test('valid config', () => {
connectTimeoutSeconds: 20,
containerName: 'mysql-test',
debug: false,
image: 'mysql:8.0.23',
image: 'mysql:9.6.0',
mySqlDb: 'test-db',
mySqlPassword: 'password',
mySqlUser: 'test-user',
Expand All @@ -49,7 +49,7 @@ test('invalid config', () => {
expect(() => readMySqlConfigSync(__dirname + '/fixtures/invalid.json'))
.toThrowErrorMatchingInlineSnapshot(`
"Unable to assign {connectionStringEnvironmentVariable: 10} to { connectionStringEnvironmentVariable: string | undefined; test: TestConfig | undefined; types: TypesConfig | undefined; }
The types of \\"connectionStringEnvironmentVariable\\" are not compatible
The types of "connectionStringEnvironmentVariable" are not compatible
Unable to assign 10 to string | undefined
Unable to assign 10 to string
Expected string, but was 10
Expand Down
Loading
Loading