Skip to content

Commit

Permalink
Merge branch 'knex:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
YoutacRandS-VA authored Mar 28, 2024
2 parents 756f0d4 + aedba5e commit 6ae2d80
Show file tree
Hide file tree
Showing 69 changed files with 11,794 additions and 66 deletions.
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ If issue is about TypeScript definitions, tag @ lorefnon.

# Missing / erroneus documentation

Send issue to documentation repo, or fix it and send PR https://github.com/knex/documentation
1. What is the missing or erroneus part of the documentation

2. What is the correct information

3. If you have time, you can also make a pull request to fix the documentation

# Questions about how to use knex

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- name: Checkout Repository
Expand All @@ -27,7 +27,7 @@ jobs:
fetch-depth: 1

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}
Expand Down Expand Up @@ -57,6 +57,6 @@ jobs:
run: npm run coveralls

- name: Update Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Knex / Documentation deployment

on:
push:
branches:
- 'master'
paths:
- docs/**
- .github/workflows/**

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x

# cache node_modules
- name: Restore cached dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
# install dependencies if the cache did not hit
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci

- name: Build documentation
run: npm run build

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
cname: knexjs.org
force_orphan: true
12 changes: 6 additions & 6 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x, 16.x]
node-version: [20.x, 18.x, 16.x]
database-type:
[
postgres,
Expand All @@ -35,12 +35,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}
Expand Down Expand Up @@ -109,15 +109,15 @@ jobs:
name: Test user experience
strategy:
matrix:
node-version: [18.x, 16.x, 14.x, 12.x]
node-version: [18.x]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with: { fetch-depth: 1 }

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/linting-legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Legacy Types Linting

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
name: Legacy Types Linting

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}

- name: Run npm install
run: npm install

- name: Run lint:everything
run: npm run lint:types:legacy
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:

strategy:
matrix:
node-version: [18.x, 16.x]
node-version: [20.x, 18.x, 16.x]

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
always-auth: false
node-version: ${{ matrix.node-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
yarn.lock
package-lock.json
!docs/package-lock.json
raw
*.sw?
.idea
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Master (Unreleased)

# 3.1.0 - 8 December, 2023

### Bug fixes

- andWhereNotJsonObject calling wrong function (#5683)
- PostgreSQL: fix error when setting query_timeout (#5673)
- MySQL: Missing comments on delete, update and insert (#5738)
- MySQL: Fixed issue with bigincrements not working with composite primary key - #5341 (#5343)

### Types

- Add type definitions for orHavingNull and orHavingNotNull (#5669)
- Import knex as type in TS migration template (#5741)
- Fix conditional constraint error (#5747)
- PostgreSQL: Fix typing to reflect pg typing change (#5647)

### New features

- Add transactor.parentTransaction (#5567)
- MySQL: Added implementation for upsert (#5743)
- Oracle: Support Object Names Greater than 30 Characters for Oracle DB Versions 12.2 and Greater (#5197)

# 3.0.1 - 6 October, 2023

- Build fix

# 3.0.0 - 6 October, 2023

- Fix raw bindings typing (#5401)
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

## Documentation

Documentation is no longer maintained in knex master repository. All the documentation pull requests should be sent to https://github.com/knex/documentation

Documentation pull requests should not be merged before knex version which has the new documented feature is released.
Documentation is maintained in the `/docs` folder. every pull request that changes the public API should also update the docs

## I would like to add support for new dialect to knex, is it possible?

Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.vitepress/dist
105 changes: 105 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { defineConfig } from 'vitepress';
import KnexDialectsPlugins from './knexDialects';

export default defineConfig({
title: 'Knex.js',
description: 'Beta knex.js documentation.',
base: '/',
srcDir: 'src',
head: [['link', { rel: 'icon', type: 'image/png', href: '/knex-logo.png' }]],
themeConfig: {
logo: '/knex-logo.png',
repo: 'knex/knex',
docsRepo: 'knex/knex',
docsDir: 'docs/src',
docsBranch: 'master',
editLinks: true,
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
nav: [
{ text: 'Guide', link: '/guide/', activeMatch: '^/guide/' },
{
text: 'F.A.Q.',
link: '/faq/',
},
{
text: 'Changelog',
link: '/changelog.html',
},
],
sidebar: {
'/guide/': getGuideSidebar(),
'/faq/': getFaqSidebar(),
},
algolia: {
appId: 'V7E3EHUPD6',
apiKey: '44b5077836c1c8fba0f364383dde7fb4',
indexName: 'knex',
initialQuery: '',
},
},
vite: {
plugins: [KnexDialectsPlugins()],
},
});

function getGuideSidebar() {
return [
{
text: 'Installation',
link: '/guide/',
},
{
text: 'Query Builder',
link: '/guide/query-builder',
},
{
text: 'Transactions',
link: '/guide/transactions',
},
{
text: 'Schema Builder',
link: '/guide/schema-builder',
},
{
text: 'Raw',
link: '/guide/raw',
},
{
text: 'Ref',
link: '/guide/ref',
},
{
text: 'Utility',
link: '/guide/utility',
},
{
text: 'Interfaces',
link: '/guide/interfaces',
},
{
text: 'Migrations',
link: '/guide/migrations',
},
{
text: 'Extending',
link: '/guide/extending',
},
];
}
function getFaqSidebar() {
return [
{
text: 'F.A.Q.',
link: '/faq/',
},
{
text: 'Recipes',
link: '/faq/recipes',
},
{
text: 'Support',
link: '/faq/support',
},
];
}
Loading

0 comments on commit 6ae2d80

Please sign in to comment.