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
3 changes: 3 additions & 0 deletions .cursorindexingignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references
.specstory/**
14 changes: 9 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ jobs:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
- uses: dart-lang/setup-dart@v1

- name: Import .tool-versions
uses: wasabeef/import-asdf-tool-versions-action@v1.1.0
id: asdf

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
sdk: stable
flutter-version: ${{ steps.asdf.outputs.flutter }}
cache: true

- name: Set environment
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
Expand Down
54 changes: 32 additions & 22 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
name: Dart CI
name: Publish to pub.dev

on:
push:
tags:
- 'v*.*.*'
- 'v[0-9]+.[0-9]+.[0-9]+' # Tag pattern to match for publishing

permissions: # Job-level permissions
contents: read # For actions/checkout
# id-token: write # Not strictly needed when using PUB_ACCESS_TOKEN/PUB_REFRESH_TOKEN directly

jobs:
build:
name: Run on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
- uses: dart-lang/setup-dart@v1
- name: Checkout repository
uses: actions/checkout@v4

- name: Import .tool-versions
uses: wasabeef/import-asdf-tool-versions-action@v1.1.0
id: asdf

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
sdk: stable
flutter-version: ${{ steps.asdf.outputs.flutter }}
cache: true

- name: Activate Melos
run: dart pub global activate melos

- name: Get Melos packages
run: melos get

- name: Set environment
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
- name: Publish packages with Melos
run: melos publish --no-dry-run --yes

- name: Get dependencies
run: |
dart pub global activate melos
melos run get
- name: Release
uses: softprops/action-gh-release@v2
- name: Create GitHub Release
uses: softprops/action-gh-release@v2 # Consider using a more recent version
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 4 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
Expand All @@ -22,14 +14,11 @@

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
/pubspec.lock
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/

# Android related
Expand Down Expand Up @@ -85,3 +74,6 @@ node_modules/
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3

# SpecStory
.specstory/
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

# lint-staged
pnpm lint-staged --allow-empty --max-arg-length 1
bun lint-staged --allow-empty --max-arg-length 1
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pnpm-lock.yaml
.dart_tool/
build/
ios/
Expand Down
6 changes: 4 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
dart 3.4.4
flutter 3.22.2-stable
dart 3.8.1
flutter 3.32.1
bun 1.2.15
nodejs 24.1.0
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
## 1.0.0

**Feature**

- Update flutter_hooks to "^0.21.2"

**Development**

- Update to Melos 6.3.3

## 0.0.7+1

**Development**
- Update some documents

- Update some documents

## 0.0.6, 0.0.7

**Feature**

- [#40](https://github.com/wasabeef/flutter_hooks_test/pull/40) Add a parameter "wrapper" to allow adding providers to hooks. by [@KalSat](https://github.com/KalSat)

```dart
final result = await buildHook(
(_) {
Expand All @@ -23,16 +36,19 @@
## 0.0.5

**Feature**

- [#35](https://github.com/wasabeef/flutter_hooks_test/pull/35) Support Flutter 3.16.0.

## 0.0.3, 0.0.4

**Feature**

- Update Dart to ">=2.17.0 <4.0.0"
- Update Flutter to ">=3.0.0"
- Update flutter_hooks to ">=0.18.0"

**Development**

- Update to Melos 3.0.1

## 0.0.1, 0.0.2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Daichi Furiya
Copyright (c) 2025 Daichi Furiya

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

## The first thing

This package has great respect for [react-hooks-testing-library](https://github.com/testing-library/react-hooks-testing-library). So the idea is based on it.
This package is heavily inspired by [react-hooks-testing-library](https://github.com/testing-library/react-hooks-testing-library), and its core concepts are based on it.

## The problem

Expand All @@ -49,7 +49,7 @@ This library aims to provide a testing experience as close as possible to native
from within a real component.

Using this library, you do not have to concern yourself with how to construct, render or interact
with the flutter component in order to test your hook. You can just use the hook directly and assert
with the Flutter component in order to test your hook. You can just use the hook directly and assert
the results.

## When to use this library
Expand All @@ -66,7 +66,7 @@ the results.

```sh
dev_dependencies:
flutter_hooks_test: ^x.x.x
flutter_hooks_test:
```

## Example
Expand Down
Loading