-
Notifications
You must be signed in to change notification settings - Fork 7
chore: enforce npm usage #578
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a8de3a6
chore: use corepack to force npm
louis-bompart 30a142a
chore: forbid non-npm lockfiles
louis-bompart 82dd08b
chore: pnpm lockfile
louis-bompart 373a393
chore: readme
louis-bompart df8c540
refactor -> contributing.md
louis-bompart 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 hidden or 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,21 @@ | ||
name: 'Lockfile' | ||
description: 'Forbid non-npm lockfiles' | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Check lockfiles | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const {existsSync} = require('fs'); | ||
['yarn.lock', 'pnpm-lock.yaml'].forEach(forbiddenLockFile => { | ||
if(existsSync(forbiddenLockFile)) { | ||
const error = `Lockfile ${forbiddenLockFile} is not allowed in this repo, remove it.`; | ||
core.error( | ||
error, | ||
{title: 'Forbidden lockfile', file: forbiddenLockFile} | ||
); | ||
process.exitCode=1 | ||
} | ||
}); | ||
|
This file contains hidden or 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
This file contains hidden or 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,24 @@ | ||
# Contributing | ||
|
||
## Requirements | ||
|
||
- Node LTS | ||
- NPM | ||
|
||
> Tip: This repo support `corepack`. Just enable it `corepack enable` and this repo will warn you if you try to use another package manager. | ||
|
||
## Guidelines | ||
|
||
- Make sure your changes are fully tested (when applicable). | ||
- We tend to avoid comments in our code base, we strongly prefer good naming and code structure. | ||
- Avoid pushing similar changes in different commits if it's within the same feature, because we want the changelogs to be clear and simple. To avoid that, there are at least 2 options: | ||
1. Squash the commits into one when merging (you need to edit the final commit message though) | ||
1. amend the previous commit when making related changes (`git commit --amend --no-edit`) | ||
|
||
## Commit messages | ||
|
||
**Every commit message must comply with the [Angular Commit Message Conventions](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format) specification. We use the commit messages to automatically bump the package version according to the semantic versionning notation. Moreover, we generate changlogs for each version using those commit messages.** | ||
|
||
- You can either manually write a commit message that follows the convention using your favorite method. | ||
- Or you can run `npm run commit-cli`. It will prompt you some questions about the nature of your changes, then it will commit your staged changes along with a generated message that follows our convention. | ||
- Commits containing breaking changes need to be marked as such in the commit footer. See [BREAKING CHANGE convention](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-footer). |
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -80,5 +80,6 @@ | |
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"packageManager": "npm@latest" | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.