Skip to content

Commit 9b3753e

Browse files
Copilotnomeguy
andcommitted
feat: prepare repository for 1.0.0 stable release
- Update version to 1.0.0 in pubspec.yaml - Enhance README with installation instructions and badges - Add CONTRIBUTING.md with contribution guidelines - Update CHANGELOG.md with 1.0.0 release notes Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
1 parent 2234f9f commit 9b3753e

4 files changed

Lines changed: 176 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
# [1.0.0](https://github.com/casbin/dart-casbin/compare/v0.2.0...v1.0.0) (2025-11-18)
2+
3+
This is the first stable production-ready release of dart-casbin! 🎉
4+
5+
### Major Changes
6+
7+
* **release:** Promote to 1.0.0 stable version
8+
* **docs:** Enhanced README with better installation instructions and badges
9+
* **docs:** Added comprehensive CONTRIBUTING.md guide
10+
11+
### Features
12+
13+
* Full support for ACL, RBAC, and ABAC models
14+
* Multiple built-in operators for rule matching
15+
* Management API and RBAC API
16+
* Comprehensive test coverage (452 tests)
17+
* Production-ready and stable
18+
19+
### Migration from 0.2.0
20+
21+
No breaking changes. Simply update your pubspec.yaml:
22+
23+
```yaml
24+
dependencies:
25+
casbin: ^1.0.0
26+
```
27+
128
# [0.2.0](https://github.com/casbin/dart-casbin/compare/v0.1.0...v0.2.0) (2025-11-18)
229
330

CONTRIBUTING.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Contributing to dart-casbin
2+
3+
Thank you for your interest in contributing to dart-casbin! This document provides guidelines and instructions for contributing.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to maintain a respectful and collaborative environment.
8+
9+
## How to Contribute
10+
11+
### Reporting Bugs
12+
13+
If you find a bug, please create an issue on GitHub with:
14+
- A clear, descriptive title
15+
- Steps to reproduce the issue
16+
- Expected behavior vs actual behavior
17+
- Your environment (Dart version, OS, etc.)
18+
- Any relevant code samples or error messages
19+
20+
### Suggesting Enhancements
21+
22+
Enhancement suggestions are welcome! Please create an issue with:
23+
- A clear description of the enhancement
24+
- Use cases and benefits
25+
- Any implementation ideas you may have
26+
27+
### Pull Requests
28+
29+
1. **Fork the repository** and create your branch from `master`
30+
```bash
31+
git checkout -b feature/your-feature-name
32+
```
33+
34+
2. **Make your changes**
35+
- Write clear, self-documenting code
36+
- Follow the existing code style
37+
- Add tests for new functionality
38+
- Update documentation as needed
39+
40+
3. **Test your changes**
41+
```bash
42+
dart pub get
43+
dart format .
44+
dart test
45+
```
46+
47+
4. **Commit your changes**
48+
- Use clear, descriptive commit messages
49+
- Follow [Conventional Commits](https://www.conventionalcommits.org/) format:
50+
- `feat:` for new features
51+
- `fix:` for bug fixes
52+
- `docs:` for documentation changes
53+
- `refactor:` for code refactoring
54+
- `test:` for test changes
55+
- `chore:` for maintenance tasks
56+
57+
5. **Push to your fork** and submit a pull request
58+
```bash
59+
git push origin feature/your-feature-name
60+
```
61+
62+
6. **Wait for review** - A maintainer will review your PR and may request changes
63+
64+
## Development Setup
65+
66+
1. **Install Dart SDK**: Follow the [official Dart installation guide](https://dart.dev/get-dart)
67+
68+
2. **Clone the repository**
69+
```bash
70+
git clone https://github.com/casbin/dart-casbin.git
71+
cd dart-casbin
72+
```
73+
74+
3. **Install dependencies**
75+
```bash
76+
dart pub get
77+
```
78+
79+
4. **Run tests**
80+
```bash
81+
dart test
82+
```
83+
84+
5. **Check formatting**
85+
```bash
86+
dart format --output=none --set-exit-if-changed .
87+
```
88+
89+
## Code Style
90+
91+
- Follow the [Effective Dart](https://dart.dev/guides/language/effective-dart) style guide
92+
- Use `dart format` to format your code
93+
- Use relative imports for internal packages
94+
- Add appropriate comments for complex logic
95+
- Maintain consistency with existing code
96+
97+
## Testing
98+
99+
- Write tests for all new functionality
100+
- Ensure all tests pass before submitting a PR
101+
- Aim for high test coverage
102+
- Tests should be clear and maintainable
103+
104+
## Documentation
105+
106+
- Update the README.md if you change functionality
107+
- Add dartdoc comments for public APIs
108+
- Include code examples in documentation where helpful
109+
- Keep the CHANGELOG.md updated (this is done automatically via semantic-release)
110+
111+
## Questions?
112+
113+
If you have questions, feel free to:
114+
- Open an issue on GitHub
115+
- Join our [Discord community](https://discord.gg/S5UjpzGZjN)
116+
- Contact the maintainers at hsluoyz@gmail.com
117+
118+
## License
119+
120+
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# dart-casbin
22

3-
An authorization library that supports access control models like ACL, RBAC, ABAC in Dart.
4-
3+
[![pub package](https://img.shields.io/pub/v/casbin.svg)](https://pub.dev/packages/casbin)
4+
[![Dart CI](https://github.com/casbin/dart-casbin/workflows/Dart%20CI/badge.svg)](https://github.com/casbin/dart-casbin/actions)
55
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
6+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
7+
8+
An authorization library that supports access control models like ACL, RBAC, ABAC in Dart.
69

710
**News**: Are you still worried about how to write the correct Casbin policy? `Casbin online editor` is coming to help! Try it at: http://casbin.org/editor/
811

@@ -98,11 +101,34 @@ You can also use the online editor (https://casbin.org/editor/) to write your Ca
98101

99102
https://casbin.org/docs/tutorials
100103

104+
## Installation
105+
106+
Add this to your package's `pubspec.yaml` file:
107+
108+
```yaml
109+
dependencies:
110+
casbin: ^1.0.0
111+
```
112+
113+
Then run:
114+
115+
```bash
116+
dart pub get
117+
```
118+
119+
Or with Flutter:
120+
121+
```bash
122+
flutter pub get
123+
```
124+
101125
## Get started
102126

103127
1. New a Casbin enforcer with a model file and a policy file:
104128

105129
```dart
130+
import 'package:casbin/casbin.dart';
131+
106132
var e = Enforcer.fromModelPathAndPolicyFile('path/to/model.conf', 'path/to/policy.csv');
107133
```
108134

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: casbin
22
description: An authorization library that supports access control models like
33
ACL, RBAC, ABAC.
4-
version: 0.2.0
4+
version: 1.0.0
55
homepage: https://casbin.org/
66
repository: https://github.com/casbin/dart-casbin
77
documentation: https://casbin.org/docs/en/overview

0 commit comments

Comments
 (0)