Skip to content

Commit 9ec3e21

Browse files
authored
Merge pull request #10 from Chinmay-KB/repo-meta-foundation
docs: add repo meta foundation
2 parents f7659fd + c300bcf commit 9ec3e21

13 files changed

Lines changed: 491 additions & 40 deletions
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Bug report
2+
description: Report a bug, regression, or unexpected behavior in stringr.
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: textarea
8+
id: summary
9+
attributes:
10+
label: Summary
11+
description: What went wrong?
12+
placeholder: A short description of the bug.
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: reproduction
17+
attributes:
18+
label: Reproduction
19+
description: Share the smallest example that reproduces the issue.
20+
placeholder: |
21+
import 'package:stringr/stringr.dart';
22+
23+
void main() {
24+
print('example'.someMethod());
25+
}
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: expected
30+
attributes:
31+
label: Expected behavior
32+
description: What did you expect to happen?
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: actual
37+
attributes:
38+
label: Actual behavior
39+
description: What happened instead?
40+
validations:
41+
required: true
42+
- type: input
43+
id: version
44+
attributes:
45+
label: stringr version
46+
placeholder: 1.2.1
47+
validations:
48+
required: true
49+
- type: input
50+
id: dart_version
51+
attributes:
52+
label: Dart version
53+
placeholder: Dart 3.x
54+
validations:
55+
required: true
56+
- type: textarea
57+
id: context
58+
attributes:
59+
label: Additional context
60+
description: Add screenshots, environment notes, or related details if helpful.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security policy
4+
url: https://github.com/Chinmay-KB/stringr/blob/master/SECURITY.md
5+
about: Please review the security policy before reporting a sensitive issue.
6+
- name: Contribution guide
7+
url: https://github.com/Chinmay-KB/stringr/blob/master/CONTRIBUTING.md
8+
about: Read the contribution guide before opening a pull request.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation improvement
2+
description: Report missing, unclear, or incorrect documentation.
3+
title: "[Docs]: "
4+
labels:
5+
- documentation
6+
body:
7+
- type: textarea
8+
id: location
9+
attributes:
10+
label: Location
11+
description: Which file, page, or section needs improvement?
12+
placeholder: README.md, CONTRIBUTING.md, API docs, examples, etc.
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: issue
17+
attributes:
18+
label: What is unclear or missing?
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: suggestion
23+
attributes:
24+
label: Suggested improvement
25+
description: Optional, but helpful if you already know what would make the docs clearer.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature request
2+
description: Propose a new API, enhancement, or behavior change.
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Problem or use case
11+
description: What are you trying to do that stringr does not support well today?
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposed solution
18+
description: Describe the API or behavior you would like to see.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: examples
23+
attributes:
24+
label: Examples
25+
description: Share example inputs and expected outputs.
26+
placeholder: |
27+
Input: ...
28+
Output: ...
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives considered
33+
description: Have you tried existing methods or workarounds?
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Unicode edge case
2+
description: Report behavior involving graphemes, combining marks, emoji, casing, transliteration, or non-Latin scripts.
3+
title: "[Unicode]: "
4+
labels:
5+
- bug
6+
- unicode
7+
body:
8+
- type: textarea
9+
id: input
10+
attributes:
11+
label: Input string
12+
description: Provide the exact input string. Include escaped form too if helpful.
13+
placeholder: "👨‍👩‍👧‍👦 family / café / XMLHttpRequest / полет птицы"
14+
validations:
15+
required: true
16+
- type: input
17+
id: method
18+
attributes:
19+
label: Method or API used
20+
placeholder: slugify(), words(), reverse(), camelCase()
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: reproduction
25+
attributes:
26+
label: Reproduction
27+
description: Share a small runnable example.
28+
placeholder: |
29+
import 'package:stringr/stringr.dart';
30+
31+
void main() {
32+
print('café'.countGrapheme());
33+
}
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: expected
38+
attributes:
39+
label: Expected output
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: actual
44+
attributes:
45+
label: Actual output
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: notes
50+
attributes:
51+
label: Notes
52+
description: Mention script, locale expectations, normalization details, or comparisons with other libraries if relevant.

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
Describe the change and why it is needed.
4+
5+
## Changes
6+
7+
-
8+
9+
## Testing
10+
11+
- [ ] `dart format .`
12+
- [ ] `dart analyze`
13+
- [ ] `dart test`
14+
15+
## Notes
16+
17+
Add any compatibility notes, Unicode edge cases, follow-ups, or reviewer context here.

AGENTS.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# AGENTS.md
2+
3+
## Project Overview
4+
5+
Stringr is a comprehensive string manipulation library for Dart/Flutter inspired by VocaJS. It provides powerful string operations that work with Latin, non-Latin, and grapheme cluster strings using complex regular expressions rather than simple whitespace splitting.
6+
7+
**Current Status**: Updated to Dart 3.0+ with modern SDK constraints and comprehensive linting rules.
8+
9+
## Development Commands
10+
11+
### Testing
12+
13+
- `dart test` - Run all tests
14+
- `dart run test_coverage` - Run tests with coverage (used in CI)
15+
- `dart test test/specific_test.dart` - Run specific test file
16+
17+
### Dependencies
18+
19+
- `dart pub get` - Install dependencies
20+
- `dart pub upgrade` - Upgrade dependencies
21+
22+
### Analysis
23+
24+
- `dart analyze` - Static analysis with comprehensive modern Dart linting rules
25+
26+
## Architecture Overview
27+
28+
The library follows a **modular extension-based architecture** with functionality organized into domain-specific modules:
29+
30+
### Core Modules
31+
32+
- **`lib/src/case/`** - Case transformations (camelCase, kebabCase, snakeCase, titleCase)
33+
- **`lib/src/chop/`** - String truncation operations (truncate, slice, prune, first, last)
34+
- **`lib/src/count/`** - Counting operations (characters, graphemes, occurrences, words)
35+
- **`lib/src/escape/`** - String escaping/unescaping (HTML, RegExp)
36+
- **`lib/src/manipulate/`** - String manipulation (insert, reverse, slugify, translate, splice)
37+
- **`lib/src/split/`** - String splitting operations (words, chars, codePoints, graphemes)
38+
39+
### Utility Infrastructure
40+
41+
- **`lib/src/util/object/`** - Generic utility extensions (ExtendedIterable)
42+
- **`lib/src/util/regex/`** - Pre-compiled regex patterns and constants for Unicode handling
43+
- **`lib/src/util/strings/`** - String utility functions, diacritics mapping, and surrogate pair handling
44+
45+
### Key Patterns
46+
47+
- Each module implements a Dart extension on `String` class
48+
- Heavy use of pre-compiled regex patterns for Unicode-aware text processing
49+
- Consistent method signatures with optional parameters and sensible defaults
50+
- Support for complex Unicode scenarios including surrogate pairs and grapheme clusters
51+
52+
## Dependencies
53+
54+
- **`characters`** ^1.3.0 - Used for grapheme cluster support and Unicode handling (Flutter-compatible version)
55+
- **`test`** ^1.26.3 - Modern testing framework (dev dependency)
56+
57+
## Important Notes
58+
59+
- Project uses dependency overrides for `file` and `watcher` packages to ensure Dart 3.0+ compatibility
60+
- The codebase has comprehensive linting rules enforced through `analysis_options.yaml`
61+
- All tests pass on Dart 3.0+ but there are linting warnings that can be addressed incrementally
62+
63+
## CI/CD
64+
65+
- GitHub Actions workflow runs on push/PR to master branch
66+
- Uses latest stable Dart container (`dart:stable`)
67+
- Runs tests with coverage and uploads to Codecov
68+
- Coverage reports stored in `coverage/lcov.info`

CODE_OF_CONDUCT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our pledge
4+
5+
We as contributors and maintainers pledge to make participation in the `stringr` community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our standards
10+
11+
Examples of behavior that contributes to a positive environment include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Taking responsibility, apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best for the community as a whole
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement responsibilities
28+
29+
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all project spaces, and also applies when an individual is officially representing the project in public spaces. Examples of representing the project include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers through GitHub issues or discussions when appropriate. For security-sensitive concerns, use the process described in `SECURITY.md`.
40+
41+
All complaints will be reviewed and investigated promptly and fairly.
42+
43+
## Attribution
44+
45+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
46+
47+
For answers to common questions about this code of conduct, see the [FAQ](https://www.contributor-covenant.org/faq).

0 commit comments

Comments
 (0)