Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6bd3506
Add jaspr_class_scope
claude Sep 10, 2026
02cc78b
Hash the file a component lives in, not its name
claude Sep 10, 2026
d2096b8
Check for suffix collisions at build time
claude Sep 10, 2026
40e7fee
Rename the annotation to @scopedCss
claude Sep 10, 2026
b7d7fee
Cut the docs down to what a reader needs
claude Sep 10, 2026
79887fe
Leave only the scopes the builder writes
claude Sep 10, 2026
936b4d2
Say what the packages do, not how
claude Sep 10, 2026
63fdadf
Six digits, taken modulo rather than cut short
claude Sep 10, 2026
aa94186
Stir the hash before cutting it to six digits
claude Sep 10, 2026
2eb0ed4
Hash with Murmur, rather than FNV wearing Murmur's finalizer
claude Sep 10, 2026
3cb1a95
Check the sources, not the code the builder wrote
claude Sep 10, 2026
15a08dd
Hash with md5, and delete the Murmur we were carrying
claude Sep 10, 2026
65efe2a
Cut the docs to what a reader uses
claude Sep 10, 2026
290b01f
Let the example show a generated scope, not a typed one
claude Sep 11, 2026
94d3861
Say what the packages are for, not what they are like
claude Sep 11, 2026
5fee3d5
Drop the three components and the grid nobody has seen yet
claude Sep 11, 2026
f50844a
Describe the packages the way pub.dev reads them
claude Sep 11, 2026
7ca443b
Keep the suffixes out of the prose
claude Sep 11, 2026
48de557
Borrow the vocabulary people already search for
claude Sep 11, 2026
e3e8b76
Call the same thing by the same name everywhere
claude Sep 11, 2026
3b8ef11
Trim the doc comments to what the code does not say
claude Sep 11, 2026
b4ffdb6
Keep the comments that say something the names do not
claude Sep 11, 2026
03bbd40
Compile against the analyzer a Jaspr project actually has
claude Sep 11, 2026
fbd40c0
jaspr_class_scope_builder: check scopes across the whole build
claude Sep 11, 2026
4a2dab9
jaspr_class_scope_builder: keep the formatter off the part files
claude Sep 11, 2026
2ded416
jaspr_class_scope_builder: say what the manifest is for
claude Sep 11, 2026
75166ca
jaspr_class_scope: drop the tests that cannot fail
claude Sep 11, 2026
b6db5fe
jaspr_class_scope_builder: spell the expected suffixes out
claude Sep 11, 2026
d745625
jaspr_class_scope: test what the tests claim
claude Sep 11, 2026
0df0984
Simplify ClassName constructors
Komoszek Sep 14, 2026
67292cf
jaspr_class_scope_builder: say where the manifest lands
claude Sep 14, 2026
cb7737d
jaspr_class_scope: point the constructor's doc at what it can see
claude Sep 14, 2026
6e0c688
jaspr_class_scope: take the review
claude Sep 14, 2026
c642517
jaspr_class_scope_builder: take the second review pass
claude Sep 14, 2026
6dd3dbd
jaspr_class_scope_builder: match the annotation by where it is declared
claude Sep 14, 2026
197e587
jaspr_class_scope_builder: read the packages off the package config a…
claude Sep 14, 2026
e885490
jaspr_class_scope_builder: keep the comments that say something
claude Sep 14, 2026
9ae7b62
jaspr_class_scope_builder: show the generated file in the README
claude Sep 14, 2026
999ecbf
jaspr_class_scope_builder: say which components the suffix tells apart
claude Sep 14, 2026
a10cd8b
jaspr_class_scope_builder: say only what the suffix tells apart
claude Sep 14, 2026
a9032d9
jaspr_class_scope_builder: name what a rename changes
claude Sep 14, 2026
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
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,23 @@ updates:
schedule:
interval: "weekly"
versioning-strategy: widen

- package-ecosystem: "pub"
directory: "/packages/jaspr_class_scope/"
groups:
all_dependencies:
patterns:
- "*"
schedule:
interval: "weekly"
versioning-strategy: widen

- package-ecosystem: "pub"
directory: "/packages/jaspr_class_scope_builder/"
groups:
all_dependencies:
patterns:
- "*"
schedule:
interval: "weekly"
versioning-strategy: widen
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,11 @@
- changed-files:
- any-glob-to-any-file:
- packages/leancode_cyberware_contract_base/**
'p: jaspr_class_scope':
- changed-files:
- any-glob-to-any-file:
- packages/jaspr_class_scope/**
'p: jaspr_class_scope_builder':
- changed-files:
- any-glob-to-any-file:
- packages/jaspr_class_scope_builder/**
33 changes: 33 additions & 0 deletions .github/workflows/jaspr_class_scope-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: jaspr_class_scope publish

on:
push:
tags: ['jaspr_class_scope-v*']

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

defaults:
run:
working-directory: packages/jaspr_class_scope

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.13

- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
with:
path: packages/jaspr_class_scope
82 changes: 82 additions & 0 deletions .github/workflows/jaspr_class_scope-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: jaspr_class_scope test

on:
push:
branches: [master]
tags-ignore: ['jaspr_class_scope-v*']
paths:
- 'packages/jaspr_class_scope/**'
- '.github/workflows/jaspr_class_scope-test.yml'
pull_request:
branches: [master]
paths:
- 'packages/jaspr_class_scope/**'
- '.github/workflows/jaspr_class_scope-test.yml'

jobs:
test:
name: Dart ${{ matrix.dart_release }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
dart_release: ['3.13']

defaults:
run:
working-directory: packages/jaspr_class_scope

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart_release }}

- name: Dart version
run: dart --version

- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- name: Download pub dependencies
run: dart pub get

- name: Run analyzer
run: dart analyze

- name: Run format
run: dart format . --set-exit-if-changed

- name: Run tests
run: dart test

- name: Dry run pub publish
# We don't want it to fail the CI, it's just to see how would `pub publish` behave.
run: dart pub publish --dry-run || true

pana-score:
name: pana score
runs-on: ubuntu-latest

permissions:
contents: read
statuses: write

steps:
- name: Clone repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Score with pana
continue-on-error: true
uses: leancodepl/mobile-tools/.github/actions/pana-score@e9f138c252f8e2254c88273367958fcc6bb39cad # pana-score-v1.3
with:
path: packages/jaspr_class_scope
33 changes: 33 additions & 0 deletions .github/workflows/jaspr_class_scope_builder-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: jaspr_class_scope_builder publish

on:
push:
tags: ['jaspr_class_scope_builder-v*']

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

defaults:
run:
working-directory: packages/jaspr_class_scope_builder

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.13

- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
with:
path: packages/jaspr_class_scope_builder
82 changes: 82 additions & 0 deletions .github/workflows/jaspr_class_scope_builder-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: jaspr_class_scope_builder test

on:
push:
branches: [master]
tags-ignore: ['jaspr_class_scope_builder-v*']
paths:
- 'packages/jaspr_class_scope_builder/**'
- '.github/workflows/jaspr_class_scope_builder-test.yml'
pull_request:
branches: [master]
paths:
- 'packages/jaspr_class_scope_builder/**'
- '.github/workflows/jaspr_class_scope_builder-test.yml'

jobs:
test:
name: Dart ${{ matrix.dart_release }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
dart_release: ['3.13']

defaults:
run:
working-directory: packages/jaspr_class_scope_builder

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart_release }}

- name: Dart version
run: dart --version

- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- name: Download pub dependencies
run: dart pub get

- name: Run analyzer
run: dart analyze

- name: Run format
run: dart format . --set-exit-if-changed

- name: Run tests
run: dart test

- name: Dry run pub publish
# We don't want it to fail the CI, it's just to see how would `pub publish` behave.
run: dart pub publish --dry-run || true

pana-score:
name: pana score
runs-on: ubuntu-latest

permissions:
contents: read
statuses: write

steps:
- name: Clone repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Score with pana
continue-on-error: true
uses: leancodepl/mobile-tools/.github/actions/pana-score@e9f138c252f8e2254c88273367958fcc6bb39cad # pana-score-v1.3
with:
path: packages/jaspr_class_scope_builder
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
| ----------------------------------------------------------------------------------- | :-----------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: |
| [`cqrs`][cqrs-link] | [Documentation][cqrs-documentation] | [![cqrs pub.dev badge][cqrs-pub-badge]][cqrs-pub-badge-link] | [![][cqrs-build-badge]][cqrs-build-badge-link] |
| [`enhanced_gradients`][enhanced_gradients-link] | [Documentation][enhanced_gradients-documentation] | [![enhanced_gradients pub.dev badge][enhanced_gradients-pub-badge]][enhanced_gradients-pub-badge-link] | [![][enhanced_gradients-build-badge]][enhanced_gradients-build-badge-link] |
| [`jaspr_class_scope`][jaspr_class_scope-link] | [Documentation][jaspr_class_scope-documentation] | [![jaspr_class_scope pub.dev badge][jaspr_class_scope-pub-badge]][jaspr_class_scope-pub-badge-link] | [![][jaspr_class_scope-build-badge]][jaspr_class_scope-build-badge-link] |
| [`jaspr_class_scope_builder`][jaspr_class_scope_builder-link] | [Documentation][jaspr_class_scope_builder-documentation] | [![jaspr_class_scope_builder pub.dev badge][jaspr_class_scope_builder-pub-badge]][jaspr_class_scope_builder-pub-badge-link] | [![][jaspr_class_scope_builder-build-badge]][jaspr_class_scope_builder-build-badge-link] |
| [~~`leancode_analytics`~~][leancode_analytics-link] | [Documentation][leancode_analytics-documentation] | [![leancode_analytics pub.dev badge][leancode_analytics-pub-badge]][leancode_analytics-pub-badge-link] | [![][leancode_analytics-build-badge]][leancode_analytics-build-badge-link] |
| [`leancode_analytics_base`][leancode_analytics_base-link] | [Documentation][leancode_analytics_base-documentation] | [![leancode_analytics_base pub.dev badge][leancode_analytics_base-pub-badge]][leancode_analytics_base-pub-badge-link] | [![][leancode_analytics_base-build-badge]][leancode_analytics_base-build-badge-link] |
| [`leancode_analytics_firebase`][leancode_analytics_firebase-link] | [Documentation][leancode_analytics_firebase-documentation] | [![leancode_analytics_firebase pub.dev badge][leancode_analytics_firebase-pub-badge]][leancode_analytics_firebase-pub-badge-link] | [![][leancode_analytics_firebase-build-badge]][leancode_analytics_firebase-build-badge-link] |
Expand Down Expand Up @@ -41,6 +43,20 @@
[enhanced_gradients-build-badge]: https://img.shields.io/github/actions/workflow/status/leancodepl/flutter_corelibrary/enhanced_gradients-test.yml?branch=master
[enhanced_gradients-build-badge-link]: https://github.com/leancodepl/flutter_corelibrary/actions/workflows/enhanced_gradients-test.yml

[jaspr_class_scope-link]: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/jaspr_class_scope
[jaspr_class_scope-documentation]: https://pub.dev/documentation/jaspr_class_scope/latest/
[jaspr_class_scope-pub-badge]: https://img.shields.io/pub/v/jaspr_class_scope
[jaspr_class_scope-pub-badge-link]: https://pub.dev/packages/jaspr_class_scope
[jaspr_class_scope-build-badge]: https://img.shields.io/github/actions/workflow/status/leancodepl/flutter_corelibrary/jaspr_class_scope-test.yml?branch=master
[jaspr_class_scope-build-badge-link]: https://github.com/leancodepl/flutter_corelibrary/actions/workflows/jaspr_class_scope-test.yml

[jaspr_class_scope_builder-link]: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/jaspr_class_scope_builder
[jaspr_class_scope_builder-documentation]: https://pub.dev/documentation/jaspr_class_scope_builder/latest/
[jaspr_class_scope_builder-pub-badge]: https://img.shields.io/pub/v/jaspr_class_scope_builder
[jaspr_class_scope_builder-pub-badge-link]: https://pub.dev/packages/jaspr_class_scope_builder
[jaspr_class_scope_builder-build-badge]: https://img.shields.io/github/actions/workflow/status/leancodepl/flutter_corelibrary/jaspr_class_scope_builder-test.yml?branch=master
[jaspr_class_scope_builder-build-badge-link]: https://github.com/leancodepl/flutter_corelibrary/actions/workflows/jaspr_class_scope_builder-test.yml

[leancode_analytics-link]: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/leancode_analytics
[leancode_analytics-documentation]: https://pub.dev/documentation/leancode_analytics/latest/
[leancode_analytics-pub-badge]: https://img.shields.io/pub/v/leancode_analytics
Expand Down
7 changes: 7 additions & 0 deletions packages/jaspr_class_scope/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files

.dart_tool/
build/
coverage/
doc/api/
pubspec.lock
3 changes: 3 additions & 0 deletions packages/jaspr_class_scope/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.1.0

- Initial release.
Loading
Loading