Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 14 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: CI

on:
push:
branches:
- main
tags:
- 'v*'
branches: ['main']
tags: ['v*']
pull_request:
branches: ['*']

Expand All @@ -30,18 +28,18 @@ jobs:
timezone: America/Sao_Paulo

- name: Setup repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand All @@ -50,10 +48,10 @@ jobs:
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
restore-keys: |
${{ runner.os }}-pnpm-store-

Expand All @@ -66,26 +64,15 @@ jobs:
run: pnpm run validate
timeout-minutes: 3

- name: SonarCloud Scan Base
- name: SonarCloud Scan
if: "!startsWith(github.ref, 'refs/tags/')"
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BASE }}
with:
projectBaseDir: packages/tree-changes

- name: SonarCloud Scan Hook
if: "!startsWith(github.ref, 'refs/tags/')"
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_HOOK }}
with:
projectBaseDir: packages/tree-changes-hook
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Publish Packages
- name: Publish Package
if: startsWith(github.ref, 'refs/tags/')
run: lerna publish from-git --no-verify-access --yes
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
"name": "tree-changes-monorepo",
"private": true,
"devDependencies": {
"@gilbarbara/eslint-config": "^0.7.1",
"@gilbarbara/eslint-config": "^0.8.4",
"@gilbarbara/prettier-config": "^1.0.0",
"@gilbarbara/tsconfig": "^0.2.3",
"@size-limit/preset-small-lib": "^11.0.0",
"@types/node": "^20.9.0",
"@vitest/coverage-v8": "^0.34.6",
"del-cli": "^5.1.0",
"happy-dom": "^12.10.3",
"husky": "^8.0.3",
"@size-limit/preset-small-lib": "^11.1.6",
"@types/node": "^22.10.6",
"@vitest/coverage-v8": "^2.1.8",
"del-cli": "^6.0.0",
"happy-dom": "^16.5.3",
"husky": "^9.1.7",
"is-ci-cli": "^2.2.0",
"lerna": "^7.4.2",
"lerna": "^8.1.9",
"repo-tools": "^0.3.1",
"size-limit": "^11.0.0",
"ts-node": "^10.9.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
"size-limit": "^11.1.6",
"ts-node": "^10.9.2",
"tsup": "^8.3.5",
"typescript": "^5.7.3"
},
"workspaces": [
"packages/*"
Expand Down
4 changes: 2 additions & 2 deletions packages/tree-changes-hook/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tree-changes-hook

[![NPM version](https://badge.fury.io/js/tree-changes-hook.svg)](https://www.npmjs.com/package/tree-changes-hook) [![build status](https://travis-ci.org/gilbarbara/tree-changes.svg)](https://travis-ci.org/gilbarbara/tree-changes) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara-github_tree-changes-hook&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara-github_tree-changes-hook) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara-github_tree-changes-hook&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gilbarbara-github_tree-changes-hook)
[![NPM version](https://badge.fury.io/js/tree-changes-hook.svg)](https://www.npmjs.com/package/tree-changes-hook) [![build status](https://travis-ci.org/gilbarbara/tree-changes.svg)](https://travis-ci.org/gilbarbara/tree-changes) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_tree-changes&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara_tree-changes) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_tree-changes&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gilbarbara_tree-changes)

React hook that uses [tree-changes](https://github.com/gilbarbara/tree-changes/tree/master/packages/tree-changes) to compare changes between two datasets.

Expand All @@ -12,7 +12,7 @@ npm install tree-changes-hook

## Usage

```typescript
```tsx
import React from 'react';
import useTreeChanges from 'tree-changes-hook';

Expand Down
18 changes: 9 additions & 9 deletions packages/tree-changes-hook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"peerDependencies": {
"react": "16.8 - 18"
"react": "16.8 - 19"
},
"dependencies": {
"@gilbarbara/deep-equal": "^0.3.1",
"tree-changes": "workspace:*"
},
"devDependencies": {
"@gilbarbara/node-helpers": "^0.1.0",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@vitejs/plugin-react": "^4.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vitest": "^0.34.6"
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.6",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vitest": "^2.1.8"
},
"scripts": {
"build": "npm run clean && tsup && ts-node scripts/fix-cjs.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/tree-changes/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tree-changes

[![NPM version](https://badge.fury.io/js/tree-changes.svg)](https://www.npmjs.com/package/tree-changes) [![build status](https://travis-ci.org/gilbarbara/tree-changes.svg)](https://travis-ci.org/gilbarbara/tree-changes) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara-github_tree-changes&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara-github_tree-changes) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara-github_tree-changes&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gilbarbara-github_tree-changes)
[![NPM version](https://badge.fury.io/js/tree-changes.svg)](https://www.npmjs.com/package/tree-changes) [![build status](https://travis-ci.org/gilbarbara/tree-changes.svg)](https://travis-ci.org/gilbarbara/tree-changes) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_tree-changes&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara_tree-changes) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_tree-changes&metric=coverage)](https://sonarcloud.io/summary/new_code?id=gilbarbara_tree-changes)

Compare changes between two datasets.

Expand Down
4 changes: 2 additions & 2 deletions packages/tree-changes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"sideEffects": false,
"dependencies": {
"@gilbarbara/deep-equal": "^0.3.1",
"is-lite": "^1.2.0"
"is-lite": "^1.2.1"
},
"devDependencies": {
"@gilbarbara/node-helpers": "^0.1.0",
"vitest": "^0.34.6"
"vitest": "^2.1.8"
},
"scripts": {
"build": "npm run clean && tsup && ts-node scripts/fix-cjs.ts",
Expand Down
6 changes: 0 additions & 6 deletions packages/tree-changes/sonar-project.properties

This file was deleted.

Loading
Loading