Skip to content

Commit 4acf238

Browse files
authored
Move from mono_repo to pub workspaces (#273)
* Move from mono_repo to pub workspaces * Move analysis_options.yaml to the root * httpbin -> httpbingo * Updated README table and badges
1 parent 572261d commit 4acf238

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+740
-350
lines changed

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Dart Neats [![Github Actions](https://github.com/google/dart-neats/actions/workflows/dart.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/dart.yml)
1+
Dart Neats
22
==========
33
_A collection of a small neat packages for dart._
44

@@ -13,30 +13,31 @@ aims to use a separate package whenever it makes sense to have an independent
1313
major version. This often means splitting functionality into separate packages,
1414
which can be reused independently.
1515

16-
| Package | Description | Version |
17-
|---|---|---|
18-
| [acyclic_steps](acyclic_steps/) | An explicit acyclic step dependency framework with concurrent evaluation and dependency injection. | [![pub package](https://img.shields.io/pub/v/acyclic_steps.svg)](https://pub.dev/packages/acyclic_steps) |
19-
| [canonical_json](canonical_json/) | Encoder and decoder for a canonical JSON format, useful when cryptographically hashing or signing JSON objects. | [![pub package](https://img.shields.io/pub/v/canonical_json.svg)](https://pub.dev/packages/canonical_json) |
20-
| [chunked_stream](chunked_stream/) | Utilities for working with chunked streams, such as byte streams which is often given as a stream of byte chunks with type `Stream<List<int>>`. | [![pub package](https://img.shields.io/pub/v/chunked_stream.svg)](https://pub.dev/packages/chunked_stream) |
21-
| [dartdoc_test](dartdoc_test/) | Utilities for testing code snippets embedded in documentation comments. | [![pub package](https://img.shields.io/pub/v/dartdoc_test.svg)](https://pub.dev/packages/dartdoc_test) |
22-
| [http_methods](http_methods/) | List of all HTTP methods registered with IANA as list of strings, and metadata such as whether a method idempotent. | [![pub package](https://img.shields.io/pub/v/http_methods.svg)](https://pub.dev/packages/http_methods) |
23-
| [neat_cache](neat_cache/) | A neat cache abstraction for wrapping in-memory or redis caches. | [![pub package](https://img.shields.io/pub/v/neat_cache.svg)](https://pub.dev/packages/neat_cache) |
24-
| [neat_periodic_task](neat_periodic_task/) | Auxiliary classes for reliably running a periodic task in a long-running process such as web-server. | [![pub package](https://img.shields.io/pub/v/neat_periodic_task.svg)](https://pub.dev/packages/neat_periodic_task) |
25-
| [pem](pem/) | PEM encoding/decoding of textual keys following RFC 7468, supporting both lax/strict-mode, and certificates chains of concatenated PEM blocks. | [![pub package](https://img.shields.io/pub/v/pem.svg)](https://pub.dev/packages/pem) |
26-
| [retry](retry/) | Utility for wrapping an asynchronous function in automatic retry logic with exponential back-off, useful when making requests over network. | [![pub package](https://img.shields.io/pub/v/retry.svg)](https://pub.dev/packages/retry) |
27-
| [safe_url_check](safe_url_check/) | Check if an untrusted URL is broken, without allowing connections to a private IP address. | [![pub package](https://img.shields.io/pub/v/safe_url_check.svg)](https://pub.dev/packages/safe_url_check) |
28-
| [sanitize_html](sanitize_html/) | Function for sanitizing HTML to prevent XSS by restrict elements and attributes to a safe subset of allowed values. | [![pub package](https://img.shields.io/pub/v/sanitize_html.svg)](https://pub.dev/packages/sanitize_html) |
29-
| [slugid](slugid/) | A URL-safe base64 encoding for UUIDv4 stripped of padding. Useful when embedding short random UUIDs in URLs. | [![pub package](https://img.shields.io/pub/v/slugid.svg)](https://pub.dev/packages/slugid) |
30-
| [vendor](vendor/) | Utility for vendoring packages into a project and rewriting import/export statements. | [![pub package](https://img.shields.io/pub/v/vendor.svg)](https://pub.dev/packages/vendor) |
16+
<!-- BEGIN PACKAGE TABLE -->
17+
| Package | Description | Version | Test |
18+
|---|---|---|---|
19+
| [acyclic_steps](acyclic_steps/) | An explicit acyclic step dependency framework with concurrent evaluation and dependency injection. | [![pub package](https://img.shields.io/pub/v/acyclic_steps.svg)](https://pub.dev/packages/acyclic_steps) | [![acyclic_steps](https://github.com/google/dart-neats/actions/workflows/pkg-acyclic_steps.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-acyclic_steps.yml) |
20+
| [canonical_json](canonical_json/) | Encoder and decoder for a canonical JSON format, useful when cryptographically hashing or signing JSON objects. | [![pub package](https://img.shields.io/pub/v/canonical_json.svg)](https://pub.dev/packages/canonical_json) | [![canonical_json](https://github.com/google/dart-neats/actions/workflows/pkg-canonical_json.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-canonical_json.yml) |
21+
| [chunked_stream](chunked_stream/) | Utilities for working with chunked streams, such as byte streams which is often given as a stream of byte chunks with type `Stream<List<int>>`. | [![pub package](https://img.shields.io/pub/v/chunked_stream.svg)](https://pub.dev/packages/chunked_stream) | [![chunked_stream](https://github.com/google/dart-neats/actions/workflows/pkg-chunked_stream.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-chunked_stream.yml) |
22+
| [dartdoc_test](dartdoc_test/) | Utilities for testing code snippets embedded in documentation comments. | [![pub package](https://img.shields.io/pub/v/dartdoc_test.svg)](https://pub.dev/packages/dartdoc_test) | [![dartdoc_test](https://github.com/google/dart-neats/actions/workflows/pkg-dartdoc_test.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-dartdoc_test.yml) |
23+
| [http_methods](http_methods/) | List of all HTTP methods registered with IANA as list of strings, and metadata such as whether a method idempotent. | [![pub package](https://img.shields.io/pub/v/http_methods.svg)](https://pub.dev/packages/http_methods) | [![http_methods](https://github.com/google/dart-neats/actions/workflows/pkg-http_methods.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-http_methods.yml) |
24+
| [neat_cache](neat_cache/) | A neat cache abstraction for wrapping in-memory or redis caches. | [![pub package](https://img.shields.io/pub/v/neat_cache.svg)](https://pub.dev/packages/neat_cache) | [![neat_cache](https://github.com/google/dart-neats/actions/workflows/pkg-neat_cache-override.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-neat_cache-override.yml) |
25+
| [neat_periodic_task](neat_periodic_task/) | Auxiliary classes for reliably running a periodic task in a long-running process such as web-server. | [![pub package](https://img.shields.io/pub/v/neat_periodic_task.svg)](https://pub.dev/packages/neat_periodic_task) | [![neat_periodic_task](https://github.com/google/dart-neats/actions/workflows/pkg-neat_periodic_task.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-neat_periodic_task.yml) |
26+
| [pem](pem/) | PEM encoding/decoding of textual keys following RFC 7468, supporting both lax/strict-mode, and certificates chains of concatenated PEM blocks. | [![pub package](https://img.shields.io/pub/v/pem.svg)](https://pub.dev/packages/pem) | [![pem](https://github.com/google/dart-neats/actions/workflows/pkg-pem.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-pem.yml) |
27+
| [retry](retry/) | Utility for wrapping an asynchronous function in automatic retry logic with exponential back-off, useful when making requests over network. | [![pub package](https://img.shields.io/pub/v/retry.svg)](https://pub.dev/packages/retry) | [![retry](https://github.com/google/dart-neats/actions/workflows/pkg-retry.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-retry.yml) |
28+
| [safe_url_check](safe_url_check/) | Check if an untrusted URL is broken, without allowing connections to a private IP address. | [![pub package](https://img.shields.io/pub/v/safe_url_check.svg)](https://pub.dev/packages/safe_url_check) | [![safe_url_check](https://github.com/google/dart-neats/actions/workflows/pkg-safe_url_check.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-safe_url_check.yml) |
29+
| [sanitize_html](sanitize_html/) | Function for sanitizing HTML to prevent XSS by restrict elements and attributes to a safe subset of allowed values. | [![pub package](https://img.shields.io/pub/v/sanitize_html.svg)](https://pub.dev/packages/sanitize_html) | [![sanitize_html](https://github.com/google/dart-neats/actions/workflows/pkg-sanitize_html.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-sanitize_html.yml) |
30+
| [slugid](slugid/) | A URL-safe base64 encoding for UUIDv4 stripped of padding. Useful when embedding short random UUIDs in URLs. | [![pub package](https://img.shields.io/pub/v/slugid.svg)](https://pub.dev/packages/slugid) | [![slugid](https://github.com/google/dart-neats/actions/workflows/pkg-slugid.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-slugid.yml) |
31+
| [typed_sql](typed_sql/) | Package for doing SQL with some type safety. | [![pub package](https://img.shields.io/pub/v/typed_sql.svg)](https://pub.dev/packages/typed_sql) | [![typed_sql](https://github.com/google/dart-neats/actions/workflows/pkg-typed_sql-override.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-typed_sql-override.yml) |
32+
| [vendor](vendor/) | Utility for vendoring packages into a project and rewriting import/export statements. | [![pub package](https://img.shields.io/pub/v/vendor.svg)](https://pub.dev/packages/vendor) | [![vendor](https://github.com/google/dart-neats/actions/workflows/pkg-vendor.yml/badge.svg)](https://github.com/google/dart-neats/actions/workflows/pkg-vendor.yml) |
33+
34+
<!-- END PACKAGE TABLE -->
3135

3236
## Repository Management
33-
The root `pubspec.yaml` is only intended to lock the development dependencies
34-
for repository management. When adding new packages or changing `mono_repo.yaml`
35-
or `mono_pkg.yaml` in a package, make sure to run the following commands to
36-
update travis configuration.
37-
38-
* `pub get`
39-
* `pub run mono_repo travis`
37+
Packages in this repository uses [pub workspaces](https://dart.dev/tools/pub/workspaces)
38+
a single `dart pub get` will resolve dependencies for all of them.
39+
Configuration of Github Actions, issue templates, issue labels, etc is automated
40+
with scripts in `tool/`.
4041

4142
## Contributing
4243
We love patches and contributions, please refer to [CONTRIBUTING.md][1] for

acyclic_steps/lib/acyclic_steps.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@
8484
/// // ... run some tests ...
8585
/// }
8686
/// ```
87-
library acyclic_steps;
87+
library;
8888

8989
export 'src/fluent_api.dart' show RunStepWrapper, Runner, Step;

acyclic_steps/lib/src/fluent_api.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,8 @@ final class StepBuilder9<A, B, C, D, E, F, G, H, I> {
901901
/// the expression defining a step. See [Step.define] for how to define steps.
902902
StepBuilder9N<A, B, C, D, E, F, G, H, I, S> deps<S>(Iterable<Step<S>> deps) {
903903
ArgumentError.checkNotNull(deps, 'deps');
904-
final _deps = List<Step<S>>.from(deps);
905-
return StepBuilder9N._(_name, _a, _b, _c, _d, _e, _f, _g, _h, _i, _deps);
904+
final deps_ = List<Step<S>>.from(deps);
905+
return StepBuilder9N._(_name, _a, _b, _c, _d, _e, _f, _g, _h, _i, deps_);
906906
}
907907

908908
/// Build a step with a single dependency.

acyclic_steps/mono_pkg.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

acyclic_steps/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ dependencies:
1313
meta: ^1.1.7
1414
dev_dependencies:
1515
test: ^1.5.1
16-
lints: ^1.0.0
1716
environment:
18-
sdk: '^3.0.0'
17+
sdk: '^3.5.0'
18+
resolution: workspace

canonical_json/analysis_options.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

canonical_json/lib/canonical_json.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/// UTF-8 in Unicode Normalization Form C and decoded as UTF-8 causing an
3939
/// [InvalidCanonicalJsonException] exception in case of strings not satisfying
4040
/// this property.
41-
library canonical_json;
41+
library;
4242

4343
import 'dart:convert' show Codec, json;
4444
import 'src/codec.dart' show CanonicalJsonCodec;

canonical_json/lib/src/decoder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ bool _isAscii(String s) => s.split('').every((c) => char(c) < 128);
4242

4343
class _RawMapEntry extends RawMapEntry {
4444
final int offset;
45-
_RawMapEntry(Uint8List key, Object? value, this.offset) : super(key, value);
45+
_RawMapEntry(super.key, super.value, this.offset);
4646
}
4747

4848
class Decoder {

canonical_json/mono_pkg.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)