Skip to content

Commit

Permalink
v0.21.x: removed formatter as submodule. now is part of main project
Browse files Browse the repository at this point in the history
  • Loading branch information
mtxr committed Dec 13, 2019
1 parent b87a27d commit adc00c4
Show file tree
Hide file tree
Showing 26 changed files with 2,448 additions and 11 deletions.
6 changes: 6 additions & 0 deletions docs/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ route: /changelog

## v0.21

### v0.21.4 - (December 12, 2019)

* **Enhancements**
* MySQL: removed getAffectedRowsCount call for mysql/xdevapi. Thanks to [@frankyjuang](https://github.com/frankyjuang).
* SAPHana: hana-client uses latest version. Thanks to [@ariel-bentu](https://github.com/ariel-bentu).

### v0.21.3 - (November 06, 2019)

* **Enhancements**
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sqltools",
"displayName": "SQLTools - Database tools",
"description": "Database management done right. Connection explorer, query runner, intellisense, bookmarks, query history. Feel like a database hero!",
"version": "0.21.3",
"version": "0.21.4",
"publisher": "mtxr",
"license": "MIT",
"main": "../dist/extension.js",
Expand All @@ -26,7 +26,7 @@
"jest": "jest --config jest.config.js --passWithNoTests",
"package": "cross-env NODE_ENV=production yarn run compile && (cd ../dist && cross-env NODE_ENV=production vsce package --yarn)",
"postcompile": "rimraf -rf ../dist/ui/theme.js || exit 0",
"postinstall": "git submodule update --init --recursive && yarn workspace @sqltools/formatter install",
"postinstall": "yarn workspace @sqltools/formatter install",
"precompile": "yarn test && yarn run clean",
"pretest": "rimraf -rf ./coverage",
"prewatch": "yarn run clean",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqltools/core",
"version": "0.21.3",
"version": "0.21.4",
"description": "SQLTools Core Files",
"main": "index.ts",
"author": "Matheus Teixeira <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sqltools/extension",
"displayName": "SQLTools - Database tools",
"description": "Database management done right. Connection explorer, query runner, intellisense, bookmarks, query history. Feel like a database hero!",
"version": "0.21.3",
"version": "0.21.4",
"publisher": "mtxr",
"license": "MIT",
"preview": false,
Expand Down
9 changes: 9 additions & 0 deletions packages/formatter/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions packages/formatter/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/lib
/dist
/coverage
5 changes: 5 additions & 0 deletions packages/formatter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
lib
node_modules
.DS_Store
coverage
21 changes: 21 additions & 0 deletions packages/formatter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019-present Matheus Teixeira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions packages/formatter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SQLTools Formatter

[![Build Status](https://github.com/mtxr/sqltools-formatter/workflows/Node%20CI/badge.svg)](https://github.com/mtxr/sqltools-formatter/actions)
[![codecov](https://img.shields.io/codecov/c/gh/mtxr/sqltools-formatter.svg)](https://codecov.io/gh/mtxr/sqltools-formatter)
[![NPM version](https://img.shields.io/npm/v/@sqltools/formatter.svg)](https://npmjs.com/package/@sqltools/formatter)
[![GitHub](https://img.shields.io/github/license/mtxr/sqltools-formatter)](https://github.com/mtxr/sqltools-formatter/blob/master/LICENSE)


> Forked from [zeroturnaround/sql-formatter](https://zeroturnaround.github.io/sql-formatter/)
This package is part of [vscode-sqltools](https://github.com/mtxr/vscode-sqltools) extension.
18 changes: 18 additions & 0 deletions packages/formatter/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
coverageDirectory: '<rootDir>/coverage',
coveragePathIgnorePatterns: ['/node_modules/', '/coverage/'],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
roots: ['test'],
testMatch: ['**/*.test.(ts)'],
};
61 changes: 61 additions & 0 deletions packages/formatter/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "@sqltools/formatter",
"version": "1.1.1",
"description": "Formats SQL queries. Part of SQLTools",
"license": "MIT",
"main": "lib/sqlFormatter.js",
"private": false,
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"keywords": [
"sql",
"formatter",
"format",
"n1ql",
"whitespaces",
"sqltools"
],
"authors": [
"Matheus Teixeira <[email protected]>",
"Rene Saarsoo",
"Uku Pattak"
],
"files": [
"lib"
],
"scripts": {
"clean": "rimraf lib dist",
"test": "jest --config jest.config.js",
"test:watch": "yarn run test -- --watch",
"check": "yarn run test",
"precompile": "yarn run check && yarn run clean",
"compile": "./node_modules/.bin/tsc -p tsconfig.json",
"build": "yarn run compile"
},
"repository": {
"type": "git",
"url": "https://github.com/mtxr/sqltools-formatter.git"
},
"bugs": {
"url": "https://github.com/mtxr/sqltools-formatter/issues"
},
"dependencies": {
"lodash": "^4.17.11"
},
"devDependencies": {
"@types/jest": "^24.0.11",
"husky": "^3.0.3",
"jest": "^24.7.0",
"jest-cli": "^24.7.0",
"rimraf": "^3.0.0",
"ts-jest": "^24.0.1",
"typescript": "^3.4.1"
},
"husky": {
"hooks": {
"pre-commit": "yarn test"
}
}
}
Loading

0 comments on commit adc00c4

Please sign in to comment.