Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
t83714 committed Dec 22, 2023
1 parent 37d3bc6 commit b567d3e
Show file tree
Hide file tree
Showing 10 changed files with 764 additions and 885 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ env:
DOCS_LOCAL_PATH: docs

jobs:
build-test-eslint-node-14:
build-test-eslint-node-18:
name: Build, Test & Eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 18
- run: yarn install
- run: yarn build
- run: yarn test
- run: yarn eslint

- name: checkout docs branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ env.GITHUB_REPOSITORY }}
token: ${{ secrets.GH_ACCESS_TOKEN }}
Expand Down Expand Up @@ -53,15 +53,15 @@ jobs:
build-test-eslint-node-12:
build-test-eslint-node-20:
name: Build, Test & Eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
- name: Use Node.js 20
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 20
- run: yarn install
- run: yarn build
- run: yarn test
Expand Down
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.eslintrc
.github/
.vscode/
src/
tsconfig.json
dist/test/
docs/
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.0.0

- Upgrade dependencies
- The package is now pure [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). It cannot be require()'d from CommonJS.

# 1.1.3
- Fixed: the callstack overflow issue of the debug mode

Expand Down
93 changes: 61 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,80 @@
{
"name": "sql-syntax",
"version": "1.1.3",
"version": "2.0.0",
"description": "Tagged template literals utilities for ease of composing SQL queries.",
"main": "./dist/cjs/index.js",
"types": "./dist/cjs/index.d.ts",
"module": "./dist/esm/index.js",
"unpkg": "./dist/umd-prod/index.js",
"files": [
"dist",
"LICENSE"
],
"types": "./dist/index.d.ts",
"type": "module",
"exports": "./dist/index.js",
"engines": {
"node": ">=18.0.0"
},
"repository": "https://github.com/t83714/SQLSyntax.git",
"author": "Jacky Jiang <[email protected]>",
"license": "Apache-2.0",
"private": true,
"scripts": {
"prettier": "prettier --write 'src/*.ts'",
"eslint": "eslint src/*.ts",
"test": "TS_NODE_PROJECT=test/tsconfig.json mocha -r ts-node/register -r tsconfig-paths/register \"test/**/*.ts\"",
"prebuild": "rimraf dist",
"build": "rollup -c -m",
"test": "mocha",
"prebuild": "rimraf dist tsconfig.tsbuildinfo",
"build": "tsc -b",
"build-docs": "rimraf docs && typedoc --gaID G-9TMY41X6WG --theme default --includeVersion --out docs src/index.ts",
"dev": "ts-node --require tsconfig-paths/register src/index.ts",
"prepublishOnly": "npm run build"
},
"sideEffects": false,
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.1.0",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"chai": "^4.3.6",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^9.2.0",
"prettier": "^2.5.1",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@types/node": "18.19.3",
"chai": "5.0.0-rc.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.1",
"mocha": "^10.2.0",
"prettier": "^3.1.1",
"rimraf": "^3.0.2",
"rollup": "^2.67.0",
"rollup-plugin-terser": "^7.0.2",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.12.0",
"tslib": "^2.3.1",
"typedoc": "^0.22.11",
"typescript": "^4.5.5"
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typedoc": "^0.25.4",
"typescript": "^5.3.3"
},
"mocha": {
"require": [
"ts-node/register"
],
"loader": "ts-node/esm",
"spec": [
"src/test/**/**.spec.ts"
]
},
"prettier": {
"tabWidth": 4,
"singleQuote": false,
"printWidth": 80,
"trailingComma": "none",
"useTabs": false,
"overrides": [
{
"files": ["**/package.json"],
"options": {
"tabWidth": 2
}
},
{
"files": [
"**/*.yml",
"**/*.yaml",
"**/.*.yaml",
"**/.*.yml",
"**/*.yaml"
],
"options": {
"tabWidth": 2
}
}
]
}
}
27 changes: 0 additions & 27 deletions prettier.config.js

This file was deleted.

116 changes: 0 additions & 116 deletions rollup.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion test/SQLSyntax.spec.ts → src/test/SQLSyntax.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {} from "mocha";
import { expect } from "chai";
import SQLSyntax, { sqls } from "sql-syntax";
import SQLSyntax, { sqls } from "../index.js";

describe("Test SQL interpolation", () => {
it("Should interpolate value correctly", () => {
Expand Down
13 changes: 0 additions & 13 deletions test/tsconfig.json

This file was deleted.

14 changes: 4 additions & 10 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
{
"compilerOptions": {
"lib": ["es2020"],
"module": "es2020",
"module": "Node16",
"moduleResolution": "Node16",
"declaration": true,
"declarationDir": ".",
"noImplicitAny": true,
"importHelpers": true,
"moduleResolution": "node",
"importHelpers": false,
"outDir": "dist",
"target": "es5",
"target": "ES2022",
"baseUrl": "./",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"ts-node": {
"compilerOptions": {
"module": "commonjs"
}
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit b567d3e

Please sign in to comment.