New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[new] Adding new library, sql-formatter via package.json #12893
Conversation
Added the library, sql-formatter, using package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops 😨 18adf5b CI test failed ❗
@ambischof please take a look at CI build https://ci.cdnjs.com/cdnjs/cdnjs/22264 for details 📝 !
Most of the error will have corresponding explanation, so that you will know what's wrong and then try to fix it!
If you cannot understand the error message and need help, feel free to ask our maintainers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please checkout #12872 "Via single package.json" part and remove uneccessary fields.
@extend1994 I think I need some advice here. Im having difficulty cloning the repo locally due to size and so I don't know how I can fix it without making an extra commit. I don't think I can amend commits on github. I tried the sparse commit as written in the guide, but it still was downloading well over 2GB and saying it was like 10% done. Other guides I found also didn't help with that. |
@ambischof extra commits are fine, I can help you squash them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ambischof Thank you for your contribution.
You did a nice work.
However, this PR need to be modified to make better be merged.
Would you please refer to #12950 & #12149?
There are some tips may help you revise this PR.
If you have some questions, please let me know.
Thank you.
ajax/libs/sql-formatter/package.json
Outdated
"src" | ||
], | ||
"scripts": { | ||
"clean": "rimraf lib dist", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove scripts
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
}, | ||
"bugs": { | ||
"url": "https://github.com/zeroturnaround/sql-formatter/issues" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove bugs
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
}, | ||
"dependencies": { | ||
"babel-runtime": "^6.18.0", | ||
"lodash": "^4.16.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove dependencies
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.14.0", | ||
"babel-core": "^6.11.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove devDependencies
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
"webpack": "^1.13.1" | ||
}, | ||
"jest": { | ||
"testPathDirs": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove jest
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
"version": "2.3.1", | ||
"description": "Formats whitespaces in a SQL query to make it more readable", | ||
"license": "MIT", | ||
"main": "dist/sql-formatter.min.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's modify as "filename": "sql-formatter.min.js",
This is the main file of this library, you might be able to find it after reading its documentation.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
], | ||
"files": [ | ||
"dist", | ||
"lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove files
part.
Because CDNJS doesn't need this part.
Thanks
ajax/libs/sql-formatter/package.json
Outdated
@@ -0,0 +1,75 @@ | |||
{ | |||
"name": "sql-formatter", | |||
"version": "2.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove version field.
Because we add this lib via single package.json.
If you add version field, this means that you have to add version folder & add files from upstream under the version folder.
This may a little be hard for the beginner.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm.
Pull request for issue: #12740
Related issue(s): N/A
Checklist for Pull request or lib adding request issue follows the conventions.
Note that if you are using a distribution purpose repository/package, please also provide the url and other related info like popularity of the source code repo/package.
Profile of the lib
Essential checklist
Auto-update checklist
Git commit checklist