Skip to content

Commit

Permalink
chore: dependencies version consistency (#2883)
Browse files Browse the repository at this point in the history
* feat: initialize syncpack config file

* feat: configure syncpack to only inspect the 'dependencies' properties of package.json files.

* feat: add syncpack as a development dependency on the monorepo.

* ci: add a command in the package.json to run the job in CI

Also abstracted the logic for checking mismatches to a script.

* chore: update pnpm-lock

* ci: configure knip to ignore syncpack

Also gave ci system permission to execute check-deps.sh

* feat: configure syncpack to ignore local dependencies.

* ci: configure syncpack workflow

* chore: clean up prevoius syncpack implementations

* ci: rename syncpack workflow extension from yml to yaml

* chore: favour lint check over new action

* chore: updated pnpm-lock

* chore: added sorting

* chore: enhanced sorting

* chore: removed formatting from fix

* chore: testing fix for `vp-docs`

* chore: downgraded syncpack to be node18 compatible

* Rebuild

* chore: revert back to master

* chore: perform fixes

* chore: install

* chore: changeset

---------

Co-authored-by: Richard Gregory <[email protected]>
  • Loading branch information
petertonysmith94 and richardgreg committed Aug 8, 2024
1 parent a2ef812 commit 95e7108
Show file tree
Hide file tree
Showing 13 changed files with 575 additions and 1,229 deletions.
6 changes: 6 additions & 0 deletions .changeset/serious-parents-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fuel-ts/abi-coder": patch
"create-fuels": patch
---

chore: dependencies version consistency
3 changes: 3 additions & 0 deletions .github/workflows/code-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: CI Setup
uses: ./.github/actions/test-setup

- name: Verify package version mismatches
run: pnpm depsync:lint

- name: Verify package.json integrity
run: pnpm lint:package-jsons

Expand Down
3 changes: 2 additions & 1 deletion .knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"textlint-rule-no-dead-link",
"@elasticpath/textlint-rule-no-dead-relative-link",
"ts-generator",
"webdriverio"
"webdriverio",
"syncpack"
]
}
39 changes: 39 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"dependencyTypes": [
"dev",
"prod"
],
"versionGroups": [
{
"label": "Ignore local dependencies",
"dependencies": [
"$LOCAL"
],
"isIgnored": true
}
],
"sortAz": [],
"sortFirst": [
"private",
"name",
"description",
"repository",
"homepage",
"bugs",
"version",
"author",
"license",
"engines",
"packageManager",
"bin",
"main",
"module",
"exports",
"types",
"typesVersions",
"files",
"scripts",
"dependencies",
"devDependencies"
]
}
12 changes: 6 additions & 6 deletions apps/create-fuels-counter-guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"@tanstack/react-query": "^5.51.21",
"dotenv": "^16.4.5",
"next": "14.2.5",
"react": "^18.3",
"react-dom": "^18.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-use": "^17.5.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18.3",
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3",
"autoprefixer": "^10.4.20",
"eslint": "^8",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.5",
"postcss": "^8",
"tailwindcss": "^3.4.7",
"typescript": "^5"
"typescript": "~5.4.5"
}
}
10 changes: 5 additions & 5 deletions apps/demo-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
},
"dependencies": {
"@fuels/vm-asm": "0.55.0",
"@types/node": "20.14.11",
"@types/react-dom": "18.3.0",
"@types/react": "18.3.3",
"@types/node": "^20.14.11",
"@types/react-dom": "^18.3",
"@types/react": "^18.3.3",
"fuels": "workspace:*",
"next": "14.2.5",
"react-dom": "18.3.1",
"react": "18.3.1",
"react-dom": "^18.3.1",
"react": "^18.3.1",
"typescript": "~5.4.5"
}
}
2 changes: 1 addition & 1 deletion apps/demo-react-cra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@testing-library/react": "^16.0.0",
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-dom": "^18.3",
"eslint-config-react-app": "^7.0.1",
"fuels": "workspace:*",
"react": "^18.3.1",
Expand Down
6 changes: 3 additions & 3 deletions apps/demo-react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@types/react-dom": "^18.3",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
Expand Down
8 changes: 4 additions & 4 deletions apps/demo-wallet-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"fuels": "workspace:*",
"next": "14.2.5",
"react": "^18.3.1",
"react-dom": "^18"
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/react-dom": "^18",
"@types/react-dom": "^18.3",
"autoprefixer": "^10.4.20",
"postcss": "^8",
"tailwindcss": "^3.4.7",
"typescript": "^5"
"typescript": "~5.4.5"
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"pretest": "turbo run pretest",
"depcheck": "knip --dependencies --tags=-knipignore",
"knip:fix": "knip --fix",
"depsync:lint": "syncpack list-mismatches",
"depsync:fix": "syncpack fix-mismatches",
"test": "vitest --run --coverage --config vitest.node.config.mts $(scripts/tests-find.sh --node)",
"test:filter": "vitest --run --coverage false --config vitest.node.config.mts",
"test:coverage-merge": "tsx ./scripts/tests-coverage-merge.ts",
Expand Down Expand Up @@ -71,7 +73,7 @@
"@internal/tsup": "workspace:*",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@playwright/test": "^1.45.3",
"@types/node": "20.14.11",
"@types/node": "^20.14.11",
"@types/node-fetch": "^2.6.11",
"@types/web": "^0.0.153",
"@typescript-eslint/eslint-plugin": "^6.9.0",
Expand Down Expand Up @@ -113,7 +115,8 @@
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-plain-text": "^1.4.2",
"vitest": "^1.6.0",
"webdriverio": "^8.39.1"
"webdriverio": "^8.39.1",
"syncpack": "12.3.3"
},
"pnpm": {
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/abi-coder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@fuel-ts/interfaces": "workspace:*",
"@fuel-ts/math": "workspace:*",
"@fuel-ts/utils": "workspace:*",
"type-fest": "^3.1.0"
"type-fest": "^4.6.0"
}
}
Loading

0 comments on commit 95e7108

Please sign in to comment.