Skip to content

Commit

Permalink
SQL formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Nov 17, 2021
1 parent 94170a6 commit 4a3bd99
Show file tree
Hide file tree
Showing 13 changed files with 7,507 additions and 192 deletions.
83 changes: 44 additions & 39 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
Package: prettifyAddins
Type: Package
Title: 'RStudio' Addins to Prettify 'JavaScript', 'C++', 'Python', and More
Version: 2.2.0
Authors@R: c(
person(
"Stéphane", "Laurent",
role = c("aut", "cre"),
email = "[email protected]"
),
person(
"James Long and contributors",
role = c("ctb", "cph"),
comment = "'Prettier' library"
),
person(
"Zeb", "Zhao",
role = c("ctb","cph"),
comment = "'indent.js' library"
),
person(
"Marijn", "Haverbeke",
role = c("ctb", "cph"),
comment = "'CodeMirror' library"
)
)
Description: Provides 'RStudio' addins to prettify 'HTML', 'CSS', 'SCSS', 'JavaScript', 'JSX', 'Markdown', 'C(++)', 'LaTeX', 'Python', 'Julia', 'XML', 'Java', 'JSON', 'Ruby', and to reindent 'C(++)', 'Fortran', 'Java', 'Julia', 'Python', 'SAS', 'Scala', 'Shell' and 'SQL'. Two kinds of addins are provided: 'Prettify' and 'Indent'. The 'Indent' addins only reindent the code, while the 'Prettify' addins also modify the code, e.g. trailing semi-colons are added to 'JavaScript' code when they are missing.
License: GPL-3
Encoding: UTF-8
Imports: shiny, rstudioapi, tools, xml2, webdriver, XRJulia, httr, utils
Suggests:
V8,
shinythemes,
shinyAce,
miniUI,
testthat
URL: https://github.com/stla/prettifyAddins
BugReports: https://github.com/stla/prettifyAddins/issues
RoxygenNote: 7.1.1
Package: prettifyAddins
Type: Package
Title: 'RStudio' Addins to Prettify 'JavaScript', 'C++', 'Python', and More
Version: 2.3.0
Authors@R: c(
person(
"Stéphane", "Laurent",
role = c("aut", "cre"),
email = "[email protected]"
),
person(
"James Long and contributors",
role = c("ctb", "cph"),
comment = "'Prettier' library"
),
person(
"Zeb", "Zhao",
role = c("ctb","cph"),
comment = "'indent.js' library"
),
person(
"Marijn", "Haverbeke",
role = c("ctb", "cph"),
comment = "'CodeMirror' library"
),
person(
"George", "Leslie-Waksman and other contributors",
role = c("ctb", "cph"),
comment = "'sql-formatter' library"
)
)
Description: Provides 'RStudio' addins to prettify 'HTML', 'CSS', 'SCSS', 'JavaScript', 'JSX', 'Markdown', 'C(++)', 'LaTeX', 'Python', 'Julia', 'XML', 'Java', 'JSON', 'Ruby', and to reindent 'C(++)', 'Fortran', 'Java', 'Julia', 'Python', 'SAS', 'Scala', 'Shell', 'SQL' and "TypeScript". Two kinds of addins are provided: 'Prettify' and 'Indent'. The 'Indent' addins only reindent the code, while the 'Prettify' addins also modify the code, e.g. trailing semi-colons are added to 'JavaScript' code when they are missing.
License: GPL-3
Encoding: UTF-8
Imports: shiny, rstudioapi, tools, xml2, webdriver, XRJulia, httr, utils
Suggests:
V8,
shinythemes,
shinyAce,
miniUI,
testthat
URL: https://github.com/stla/prettifyAddins
BugReports: https://github.com/stla/prettifyAddins/issues
RoxygenNote: 7.1.2
215 changes: 121 additions & 94 deletions LICENSE.note
Original file line number Diff line number Diff line change
@@ -1,94 +1,121 @@
# __Copies of license agreements__

The 'prettifyAddins' package as a whole is distributed under GPL-3 (GNU
GENERAL PUBLIC LICENSE version 3).

It includes other open source software components:

- **Prettier**, https://github.com/prettier/prettier
- **indent.js**, https://github.com/zebzhao/indent.js
- **CodeMirror**, https://github.com/codemirror/CodeMirror

Full copies of the license agreements used by these components are included
below.



### 'Prettier' license

MIT License

Copyright © James Long and contributors

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.



### 'indent.js' license

The MIT License (MIT)
=====================

Copyright © 2018 Zeb Zhao

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.



### 'CodeMirror' license

MIT License

Copyright (C) 2017 by Marijn Haverbeke <[email protected]> and others

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.
# __Copies of license agreements__

The 'prettifyAddins' package as a whole is distributed under GPL-3 (GNU
GENERAL PUBLIC LICENSE version 3).

It includes other open source software components:

- **Prettier**, https://github.com/prettier/prettier
- **indent.js**, https://github.com/zebzhao/indent.js
- **CodeMirror**, https://github.com/codemirror/CodeMirror

Full copies of the license agreements used by these components are included
below.



### 'Prettier' license

MIT License

Copyright © James Long and contributors

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.



### 'indent.js' license

The MIT License (MIT)
=====================

Copyright © 2018 Zeb Zhao

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.



### 'CodeMirror' license

MIT License

Copyright (C) 2017 by Marijn Haverbeke <[email protected]> and others

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.



### 'SQL Formatter' license

The MIT License (MIT)

Copyright (c) 2016-2020 ZeroTurnaround LLC
Copyright (c) 2020-present George Leslie-Waksman and other contributors

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.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# prettifyAddins 2.3.0

Better SQL formatter.


# prettifyAddins 2.2.0

Possibility to prettify or indent TypeScript (`.ts` and `.tsx` files).
Expand Down
5 changes: 3 additions & 2 deletions R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ getPrettifiableLanguages <- function(){
list(
Shiny = list(
Prettify = c("HTML", "CSS", "SCSS", "JavaScript", "JSX", "Markdown",
"TypeScript", "YAML"),
"SQL", "TypeScript", "YAML"),
Indent = c("HTML", "CSS", "SCSS", "JavaScript", "JSX", "C(++)", "Fortran",
"Java", "Julia", "Python", "SAS", "Shell", "SQL", "TypeScript")
),
V8 = list(
Prettify = c("HTML", "CSS", "SCSS", "JavaScript", "JSX", "Markdown",
"TypeScript", "YAML"),
"SQL", "TypeScript", "YAML"),
Indent = c("HTML", "CSS", "SCSS", "JavaScript", "JSX", "TypeScript")
),
CLANG = c("C(++)", "Java"),
Expand All @@ -40,6 +40,7 @@ Languages <- function(){
markdown = "markdown",
rmd = "markdown",
scss = "scss",
sql = "sql",
ts = "typescript",
tsx = "typescript",
yaml = "yaml",
Expand Down
Loading

0 comments on commit 4a3bd99

Please sign in to comment.