mirror of
https://github.com/AdguardTeam/AdguardFilters.git
synced 2026-08-29 12:14:41 +00:00
Migrate from Yarn to npm package manager and update AGLint to v3 (#205942)
* migrate from Yarn to npm package manager and update dependencies * update CODEOWNERS file with new ownership assignments and reorder entries
This commit is contained in:
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -1,11 +1,14 @@
|
||||
# Each line defines file patterns and the corresponding owners (preceded by '@')
|
||||
|
||||
.aglintrc.yaml @Alex-302 @scripthunter7 @slavaleleka
|
||||
.github/workflows/* @Alex-302 @scripthunter7 @slavaleleka
|
||||
.gitattributes @Alex-302 @scripthunter7 @slavaleleka
|
||||
.github/CODEOWNERS @Alex-302 @scripthunter7 @slavaleleka @ameshkov
|
||||
.github/dependabot.yml @Alex-302 @scripthunter7 @slavaleleka
|
||||
.github/workflows/* @Alex-302 @scripthunter7 @slavaleleka
|
||||
.gitignore @Alex-302 @scripthunter7 @slavaleleka
|
||||
.husky/* @Alex-302 @scripthunter7 @slavaleleka
|
||||
.markdownlint.json @Alex-302 @scripthunter7 @slavaleleka
|
||||
.markdownlintignore @Alex-302 @scripthunter7 @slavaleleka
|
||||
.vscode/* @Alex-302 @scripthunter7 @slavaleleka
|
||||
package-lock.json @Alex-302 @scripthunter7 @slavaleleka
|
||||
package.json @Alex-302 @scripthunter7 @slavaleleka
|
||||
yarn.lock @Alex-302 @scripthunter7 @slavaleleka
|
||||
|
||||
10
.github/workflows/aglint.yml
vendored
10
.github/workflows/aglint.yml
vendored
@@ -11,7 +11,7 @@ on:
|
||||
- "**/*.txt"
|
||||
- ".aglintrc.*"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package-lock.json"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -19,7 +19,7 @@ on:
|
||||
- "**/*.txt"
|
||||
- ".aglintrc.*"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package-lock.json"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -33,14 +33,14 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: yarn
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
run: npm ci
|
||||
|
||||
# If the linter found any errors, it will exit with a non-zero code, which will cause the job to fail
|
||||
- name: Run AGLint
|
||||
run: yarn lint
|
||||
run: npm run aglint
|
||||
|
||||
notify:
|
||||
name: Send Slack notification on failure
|
||||
|
||||
10
.github/workflows/markdownlint.yml
vendored
10
.github/workflows/markdownlint.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
- ".markdownlint.json"
|
||||
- ".markdownlintignore"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package-lock.json"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -21,7 +21,7 @@ on:
|
||||
- ".markdownlint.json"
|
||||
- ".markdownlintignore"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package-lock.json"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -35,14 +35,14 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: yarn
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
run: npm ci
|
||||
|
||||
# If the linter found any errors, it will exit with a non-zero code, which will cause the job to fail
|
||||
- name: Run markdownlint
|
||||
run: yarn markdownlint .
|
||||
run: npm run markdownlint
|
||||
|
||||
notify:
|
||||
name: Send Slack notification on failure
|
||||
|
||||
@@ -10,8 +10,8 @@ function changed {
|
||||
git diff --name-only HEAD@{1} HEAD | grep "^$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# If package.json or yarn.lock is changed, we should sync local dependencies
|
||||
if changed "package.json" || changed "yarn.lock"; then
|
||||
echo "package.json or yarn.lock changed, running yarn install to sync dependencies"
|
||||
yarn install --force
|
||||
# If package.json or package-lock.json is changed, we should sync local dependencies
|
||||
if changed "package.json" || changed "package-lock.json"; then
|
||||
echo "package.json or package-lock.json changed, running npm install to sync dependencies"
|
||||
npm install --force
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,6 @@ instructions below to make your ideas come to life faster!
|
||||
- You need to have the following tools installed on your machine:
|
||||
- [Git][git]
|
||||
- [Node.js][nodejs] (we recommend using the latest LTS version)
|
||||
- [Yarn][yarn] (you can install it using npm: `npm install -g yarn`)
|
||||
- [Visual Studio Code][vscode] (we recommend using this editor)
|
||||
- Install the recommended extensions for VSCode (listed in `.vscode/extensions.json`).
|
||||
- At first launch, you will be prompted to install them. If not, press `CTRL+SHIFT+P` and type
|
||||
@@ -22,7 +21,6 @@ instructions below to make your ideas come to life faster!
|
||||
[git]: https://git-scm.com/downloads
|
||||
[nodejs]: https://nodejs.org/en/download
|
||||
[vscode]: https://code.visualstudio.com/download
|
||||
[yarn]: https://classic.yarnpkg.com/en/docs/install
|
||||
|
||||
## Setting up the repository
|
||||
|
||||
@@ -32,7 +30,7 @@ After you have installed the necessary tools, you need to set up the repository.
|
||||
1. Clone remote repository from GitHub to your local machine.
|
||||
1. Install the dependencies by running the following command in the terminal:
|
||||
```bash
|
||||
yarn install
|
||||
npm install
|
||||
```
|
||||
This will install necessary tools like [AGLint][aglint] and initialize [Husky][husky] hooks.
|
||||
|
||||
|
||||
2914
package-lock.json
generated
Normal file
2914
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"name": "@adguard/filters",
|
||||
"version": "1.0.0",
|
||||
"author": "AdGuard Software Ltd.",
|
||||
"license": "GPL-3.0-only",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/AdguardTeam/AdguardFilters.git"
|
||||
@@ -12,15 +15,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/AdguardTeam/AdguardFilters#readme",
|
||||
"scripts": {
|
||||
"lint": "aglint",
|
||||
"prepare": "node .husky/install.mjs"
|
||||
"aglint": "aglint",
|
||||
"markdownlint": "markdownlint .",
|
||||
"lint": "npm run aglint && npm run markdownlint",
|
||||
"prepare": "node .husky/install.js"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.txt": "aglint",
|
||||
"*.md": "markdownlint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@adguard/aglint": "2.1.5",
|
||||
"@adguard/aglint": "3.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.0.0",
|
||||
"markdownlint": "^0.38.0",
|
||||
|
||||
Reference in New Issue
Block a user