-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
🏗️✨ Add task to verify package manifests #11
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7e02ddf
📦 Update dependencies
DerekNonGeneric 2ae117a
🏗️✨ Introduce verify:pjson task
DerekNonGeneric 07c9e76
lint Markdown using Prettier integrated into the ESLint
DerekNonGeneric d09a487
fail validation unless MIT license specified
DerekNonGeneric f0c6ebd
prefer use of MIT license in `package.json`
DerekNonGeneric 4e65d76
fix(deps): upgrade packages & get validation re-operational (WIP)
DerekNonGeneric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
save-exact=true | ||
loglevel=silent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
MIT License | ||
|
||
Copyright (c) The OpenINF Authors. All Rights Reserved. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as pjsonKeyOrder } from './pjson-key-order.mjs'; | ||
export { default as npmPackageJsonLintRc } from './npm-package-json-lint.mjs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { pjsonKeyOrder } from 'loader339/config'; | ||
|
||
export default { | ||
extends: [ | ||
'npm-package-json-lint-config-default', | ||
'@wordpress/npm-package-json-lint-config', | ||
], | ||
rules: { | ||
'prefer-property-order': ['error', pjsonKeyOrder], | ||
'scripts-type': 'error', | ||
'valid-values-license': ['error', ['MIT']], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/** | ||
* @file Package manifest key order config. | ||
* | ||
* Much of the order of these keys follow the order of appearance seen in | ||
* npm's `man` page. Additionally found [here]. | ||
* | ||
* [here]: https://docs.npmjs.com/files/package.json | ||
* | ||
* @author Derek Lewis <DerekNonGeneric@inf.is> | ||
* @license 0BSD | ||
* @module {EsModule} config/pjson-key-order | ||
*/ | ||
export default [ | ||
/** | ||
* Details | ||
*/ | ||
'$schema', | ||
'name', | ||
'version', | ||
'description', | ||
'keywords', | ||
'homepage', | ||
'bugs', | ||
'license', | ||
'author', | ||
'maintainers', | ||
'contributors', | ||
|
||
/** | ||
* Yarn specific | ||
*/ | ||
'workspaces', | ||
|
||
/** | ||
* Configuration | ||
*/ | ||
|
||
'files', | ||
'main', | ||
'module', | ||
'type', | ||
'exports', | ||
'browser', | ||
'bin', | ||
'man', | ||
'directories', | ||
'repository', | ||
'scripts', | ||
'config', | ||
'sideEffects', | ||
'types', | ||
'typings', | ||
|
||
/** | ||
* Dependencies | ||
*/ | ||
'dependencies', | ||
'devDependencies', | ||
'peerDependencies', | ||
'bundleDependencies', | ||
'bundledDependencies', | ||
'optionalDependencies', | ||
|
||
/** | ||
* Constraints | ||
*/ | ||
'engines', | ||
'engine-strict', | ||
'engineStrict', | ||
'os', | ||
'cpu', | ||
|
||
/** | ||
* Miscellaneous | ||
*/ | ||
'preferGlobal', | ||
'private', | ||
|
||
/** | ||
* Package publishing configuration | ||
*/ | ||
'publishConfig', | ||
]; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is this verified by CI? seems doable and also would ensure no unknown changes happen
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.
It's not currently, what CI do you want to use?
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.
At the least, by
npm test
- personally i use travis everywhere, but you could use Github Actions too.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.
SGTM
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.
The GitHub outages are a bit unnerving, but I'm willing to do it.
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.
@ljharb, for some reason I got the impression that you felt that all of the package.json keys were supposed to be in alphabetical order, but that's not what this PR is doing. I would like to get to the bottom of this… What is the order we should use? lol