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
28 changes: 14 additions & 14 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@
- `packages/ack`: core runtime validation library.
- `packages/ack_annotations`: source annotation for `@AckType()` schema
generation.
- `packages/ack_generator`: build_runner generator + golden tests.
- `packages/ack_generator`: build_runner generator + unit/integration tests.
- `packages/ack_firebase_ai`: Firebase AI schema adapter.
- `packages/ack_json_schema_builder`: JSON Schema adapter.
- `example`: sample usage.

## Environment and setup
- Required SDKs: Dart `>=3.8.0 <4.0.0`, Flutter `>=3.16.0` (see `/pubspec.yaml`).
- Use from repo root:
1. `dart pub global activate melos`
2. `melos bootstrap`
- Optional one-shot setup script: `./setup.sh` (installs Dart/Melos/Node tools where possible).
1. `dart pub get`
2. `dart run melos bootstrap`
- Optional one-shot setup script: `./setup.sh` (validates the Flutter SDK, bootstraps the workspace, and installs Node tools when npm is available).

## Commands you should run
- Full CI-equivalent local check: `melos run test --no-select`
- Full CI-equivalent local check: `dart run melos run test --no-select`
- Runs strict analyze (`dart analyze . --fatal-infos`) and package tests.
- Useful targeted commands:
- `melos run analyze`
- `melos run test:dart`
- `melos run test:flutter`
- `melos run build` (when generator-related code changes)
- `melos run test:gen` / `melos run update-golden:all` (for generator golden updates)
- `melos run validate-jsonschema` (for JSON Schema conformance tooling)
- `dart run melos run analyze`
- `dart run melos run test:dart`
- `dart run melos run test:flutter`
- `dart run melos run build` (when generator-related code changes)
- `dart run melos run test:gen` (for generator changes)
- `dart run melos run validate-jsonschema` (for JSON Schema conformance tooling)

## Change-scope guidance
- Keep changes minimal and package-scoped; do not refactor unrelated files.
Expand All @@ -39,12 +39,12 @@
## CI and release notes
- CI is defined in `/.github/workflows/ci.yml` and delegates to `btwld/dart-actions/.github/workflows/ci.yml@main` with DCM enabled.
- Conventional Commits are expected for commit messages.
- Publishing/versioning flows are documented in `/PUBLISHING.md` (`melos version`, `melos publish`).
- Publishing/versioning flows are documented in `/PUBLISHING.md` (`dart run melos version`, `dart run melos publish`).

## Errors encountered during onboarding and workarounds
1. **Error:** `melos: command not found` when running checks in a fresh environment.
**Workaround:** install Melos (`dart pub global activate melos`) and/or invoke via `dart run melos ...` after Dart is available.
**Workaround:** resolve root dependencies with `dart pub get`, then invoke the workspace-local executable via `dart run melos ...`.
2. **Error:** `dart: command not found` in bare sandbox environments.
**Workaround:** install Dart SDK first (or run `./setup.sh`), then bootstrap with Melos.
**Workaround:** install Flutter (which includes Dart), then run `./setup.sh`.
3. **Observed CI state:** workflow run may show `conclusion: action_required` with no jobs for PR contexts awaiting approval/permissions.
**Workaround:** have a maintainer approve/enable the run, then re-run CI.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@ packages/ack/coverage

# Coverage
coverage/*
!coverage/lcov.info
packages/*/coverage/*
!packages/*/coverage/lcov.info

# Keep .claude directory
.claude/*
!.claude/skills/
CLAUDE.md
.idea
*.iml

# Node.js dependencies for tools
tools/node_modules/
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## Unreleased

* Fix validation edge cases, schema export consistency, schema immutability,
generator diagnostics, and workspace/release tooling reliability.
* Bound lazy recursion through wrappers and fluent copies, align RFC date-time
and IPv6 behavior, run root tooling tests in CI, prevent stale API reports,
and avoid partial changelog updates when validation fails.
* **Behavior changes** (no API break): fail-fast schema construction, stricter
`multipleOf`/IPv6/date-time validation, `toJsonSchema()` keyword merging, and
generator rejection of nullable list elements. See the `ack` and
`ack_generator` changelogs for per-package details and migration notes.

## 1.0.0 - 2026-06-26

* See [release notes](https://github.com/btwld/ack/releases/tag/v1.0.0) for details.
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ review.
## Development setup

```bash
dart pub global activate melos
melos bootstrap
dart pub get
dart run melos bootstrap
```

Ack uses a Melos workspace. Run commands from the repository root unless a
Expand All @@ -22,20 +22,20 @@ package README says otherwise.
4. Run the relevant checks:

```bash
melos analyze
melos test
dart run melos run analyze
dart run melos run test
```

For code generation changes, also run:

```bash
melos run test:gen
dart run melos run test:gen
```

For JSON Schema export changes, also run:

```bash
melos run validate-jsonschema
dart run melos run validate-jsonschema
```

## Commit style
Expand Down
10 changes: 5 additions & 5 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ The Ack project uses GitHub Releases to manage versioning and publishing. This a
Before creating a release:

1. Ensure all changes are committed and pushed to the `main` branch
2. Verify that all tests pass by running `melos test` (include `melos run validate-jsonschema` and `melos run test:gen` for full coverage)
2. Verify that all tests pass by running `dart run melos run test` (include `dart run melos run validate-jsonschema` and `dart run melos run test:gen` for full coverage)
3. Check that the documentation is up to date across the repo and docs site
4. Decide on the new version number following [Semantic Versioning](https://semver.org/) and apply it consistently to every publishable package (`ack`, `ack_annotations`, `ack_generator`, `ack_firebase_ai`, `ack_json_schema_builder`)
5. Ensure package CHANGELOG entries are finalized before tagging. If you want a link-only entry for a version, you can run `dart scripts/update_release_changelog.dart <version> [tag]` after `melos version`.
5. Ensure package CHANGELOG entries are finalized before tagging. If you want a link-only entry for a version, you can run `dart scripts/update_release_changelog.dart <version> [tag]` after `dart run melos version`.

### 2. Create a GitHub Release

Expand Down Expand Up @@ -86,10 +86,10 @@ If needed, you can version packages locally from conventional commits:

```bash
# Propose/apply version and changelog updates
melos version
dart run melos version

# Non-interactive
melos version --yes
dart run melos version --yes

# Push the changes and tags
git push --follow-tags
Expand All @@ -106,7 +106,7 @@ for pkg in ack ack_annotations ack_generator ack_json_schema_builder ack_firebas
done

# Actual publish (no dry-run)
melos run publish
dart run melos run publish
```

## Troubleshooting
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ final userSchema = Ack.object({
Run the generator:

```bash
dart run build_runner build --delete-conflicting-outputs
dart run build_runner build
```

This emits a `UserType` extension type with `parse`/`safeParse` and typed
Expand Down Expand Up @@ -185,55 +185,55 @@ This project uses [Melos](https://github.com/invertase/melos) to manage the mono
### Setup

```bash
# Install Melos (if not already installed)
dart pub global activate melos
# Resolve the workspace-local Melos dependency
dart pub get

# Bootstrap the workspace (installs dependencies for all packages)
melos bootstrap
dart run melos bootstrap
```

### Common commands (run from root)

```bash
# Run tests across all packages
melos test
dart run melos run test

# Format code across all packages
melos format
dart run melos run format

# Analyze code across all packages
melos analyze
dart run melos run analyze

# Check for outdated dependencies
melos deps-outdated
dart run melos run deps-outdated

# Run build_runner for packages that need it (e.g., ack_generator, example)
melos build
dart run melos run build

# Clean build artifacts
melos clean
dart run melos run clean

# Propose/apply version and changelog updates
melos version
dart run melos version

# Dry-run pub.dev validation for one package
(cd packages/ack && dart pub publish --dry-run)

# Publish all packages (no dry-run)
melos run publish
dart run melos run publish
```

### Development tools

```bash
# JSON Schema validation (JSON Schema Draft-7 compatibility)
melos validate-jsonschema
dart run melos run validate-jsonschema

# API compatibility check (for semantic versioning)
melos api-check v0.2.0
dart run melos run api-check -- v0.2.0

# See all available scripts
melos list-scripts
dart run melos run --list
```

Additional development documentation is available in the `tools/` directory.
Expand All @@ -249,6 +249,6 @@ Contributions are welcome. Follow these steps:
1. Fork the repository
2. Create a feature branch
3. Add your changes
4. Run tests with `melos test`
4. Run tests with `dart run melos run test`
5. Follow [Conventional Commits](https://www.conventionalcommits.org/) in your commit messages
6. Submit a pull request
Loading
Loading