Skip to content

Commit

Permalink
Merge branch 'invertase:main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuberen authored Nov 19, 2023
2 parents 659b48f + 5d49c4a commit 06c534e
Show file tree
Hide file tree
Showing 46 changed files with 932 additions and 165 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/latest_melos_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Updates the `melos-latest` branch to the latest Melos release.
name: Latest Melos release

on:
push:
tags:
- melos-v*

jobs:
release_docs:
runs-on: ubuntu-latest
steps:
- run: git push -f origin HEAD:melos-latest
97 changes: 97 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,103 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2023-10-24

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`melos` - `v3.2.0`](#melos---v320)

---

#### `melos` - `v3.2.0`

- **REFACTOR**: fix analyzer issues ([#590](https://github.com/invertase/melos/issues/590)). ([2f19770e](https://github.com/invertase/melos/commit/2f19770eee9deff097d26202bece72bd6b2127a1))
- **FEAT**: support syncing common dependency versions ([#526](https://github.com/invertase/melos/issues/526)). ([39e5e499](https://github.com/invertase/melos/commit/39e5e499d71e95cf7794ae724ab2ccd3bb4e9fd5))
- **FEAT**: Expose `Changelog` and `ManualVersionChange` ([#538](https://github.com/invertase/melos/issues/538)). ([b049ed89](https://github.com/invertase/melos/commit/b049ed897402921a5b0f3b818e49b47e3b3bf4cf))
- **DOCS**: added link to `atproto.dart` ([#544](https://github.com/invertase/melos/issues/544)). ([aa891d82](https://github.com/invertase/melos/commit/aa891d8268f0aba7335ca274af747a15c9e72848))
- **DOCS**: growerp also use melos ([#551](https://github.com/invertase/melos/issues/551)). ([c679622f](https://github.com/invertase/melos/commit/c679622f1279107e31ec1d10d2b21c18877f7771))


## 2023-07-14

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`melos` - `v3.1.1`](#melos---v311)

---

#### `melos` - `v3.1.1`

- **FIX**: pass extra args to exec scripts ([#540](https://github.com/invertase/melos/issues/540)). ([27b2275d](https://github.com/invertase/melos/commit/27b2275d5f44cbc3b93e780c88618363afca0b55))
- **FIX**: generate correct path in `modules.xml` for package at workspace root ([#539](https://github.com/invertase/melos/issues/539)). ([712ae6c3](https://github.com/invertase/melos/commit/712ae6c332d2f50e9b62917f4ffeb9debb1279cc))


## 2023-05-22

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`melos` - `v3.1.0`](#melos---v310)

---

#### `melos` - `v3.1.0`

- **REFACTOR**: tidy up workspace name validation and fix docs ([#522](https://github.com/invertase/melos/issues/522)). ([3d76097d](https://github.com/invertase/melos/commit/3d76097db131b760368766ecbf7e133f2e1db23e))
- **FEAT**: improve output for multi-line scripts ([#524](https://github.com/invertase/melos/issues/524)). ([b4d71300](https://github.com/invertase/melos/commit/b4d7130006d7cdc04967c6b42f41850f56f71229))
- **FEAT**: set exit code to 1 when detecting cycles in `melos list` ([#523](https://github.com/invertase/melos/issues/523)). ([e2863e6f](https://github.com/invertase/melos/commit/e2863e6f043702da4d1b12d0ac837211beb8977e))
- **DOCS**: add `NetGlade/auto_mappr` to user of melos ([#508](https://github.com/invertase/melos/issues/508)). ([60c86195](https://github.com/invertase/melos/commit/60c86195c176d1b06f0bd983d903593465a15ce7))


## 2023-03-30

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`conventional_commit` - `v0.6.0+1`](#conventional_commit---v0601)
- [`melos` - `v3.0.1`](#melos---v301)

---

#### `conventional_commit` - `v0.6.0+1`

- **FIX**: commit scopes that contain "-" should be treated as valid scopes ([#496](https://github.com/invertase/melos/issues/496)). ([615c208e](https://github.com/invertase/melos/commit/615c208e08bb6c7a4c159fe0a06561b0b42edd50))

#### `melos` - `v3.0.1`

- **DOCS**: pin docs to latest Melos release ([#373](https://github.com/invertase/melos/issues/373)). ([d1fd8d1f](https://github.com/invertase/melos/commit/d1fd8d1ff7f785fb625e34da65b2662bcabfbb60))


## 2023-03-10

### Changes
Expand Down
37 changes: 37 additions & 0 deletions docs/commands/bootstrap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,43 @@ example:
melos bootstrap --diff="main"
```

## Bootstrap flags

Melos bootstrap command supports a few different flags that can be defined in
your `melos.yaml`.


### Shared dependencies

If you want to share dependency versions between your packages in your Melos
project, just add the dependencies you wish to share between the packages to
your bootstrap config in your `melos.yaml` file.

If a dependency from `environment`, `dependencies` or `dev_dependencies` in
your `melos.yaml` exists in a package, the dependency version in this
package will be updated to match the version defined in your
bootstrap config every time `melos bootstrap` is run.

```yaml
# melos.yaml
# ...
command:
environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.0.0 <4.0.0"
bootstrap:
dependencies:
collection: ^1.18.0
integral_isolates: any
uni_links2:
uni_links_macos:
git: https://github.com/SamJakob/uni_links_macos.git

dev_dependencies:
build_runner: ^2.3.3
# ...
```

## Adding a post bootstrap lifecycle script

Melos supports various command [lifecycle hooks](/configuration/scripts#hooks)
Expand Down
8 changes: 4 additions & 4 deletions docs/configuration/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ project.
The name of this project for display purposes within IO environments and IDEs.

```yaml
name: My Awesome Project
name: my_project
```
## repository
Expand Down Expand Up @@ -87,7 +87,7 @@ packages:
[`--scope` filter](/filters#--scope) flag.
</Info>

Avoid recursive whildcards (`**`) as they require walking large parts of the
Avoid recursive wildcards (`**`) as they require walking large parts of the
file system and can be slow. If you have packages at multiple levels of depth,
consider using multiple patterns instead:

Expand Down Expand Up @@ -115,7 +115,7 @@ ignore:

## ide/intellij

Configuration realting to IntelliJ IDE support.
Configuration relating to IntelliJ IDE support.

### enabled

Expand Down Expand Up @@ -151,7 +151,7 @@ Configuration for the `bootstrap` command.

### dependencyOverridePaths

A list of paths to local packages realtive to the workspace directory that
A list of paths to local packages relative to the workspace directory that
should be added to each workspace package's dependency overrides. Each entry can
be a specific path or a [glob] pattern.

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/scripts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ the script in all packages, use the `--no-select` option.
## Hooks

Certain Melos commands support running scripts before and after the command is
executed, as well as at other interstring points in the command's execution.
executed, as well as at other interesting points in the command's execution.

All commands that support hooks, support at least the `pre` and `post` hook.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you don't have a `pubspec.yaml` file at the workspace root yet, create one
now:

```yaml
name: <project>_workspace
name: my_project_workspace

environment:
sdk: '>=2.18.0 <3.0.0'
Expand All @@ -58,7 +58,7 @@ Next create a `melos.yaml` file at the repository root. Within the `melos.yaml`
file, add the `name` and `packages` fields:

```yaml
name: <project>
name: my_project
packages:
- packages/*
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/automated-releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ releases.

Just start writing commit messages that follow Conventional Commits. When you
are ready to release a package for the first time with Melos use [manual
versioning][#manual-versioning]. This will ensure that the version increment is
versioning](/guides/automated-releases#manual-versioning). This will ensure that the version increment is
appropriate for all commits, including those that Melos cannot interpret.

Once you have manullay versioning every packages at least once, you can savely
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/migrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you don't have a `pubspec.yaml` file at the workspace root yet, create one
now:

```yaml
name: <project>_workspace
name: my_project_workspace

environment:
sdk: '>=2.18.0 <3.0.0'
Expand Down
4 changes: 4 additions & 0 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ The following projects are using Melos:
- [sub6resources/flutter_html](https://github.com/sub6resources/flutter_html)
- [ferraridamiano/ConverterNOW](https://github.com/ferraridamiano/ConverterNOW)
- [rrifafauzikomara/youtube_video](https://github.com/rrifafauzikomara/youtube_video)
- [NetGlade/auto_mappr](https://github.com/netglade/auto_mappr)
- [myConsciousness/atproto.dart](https://github.com/myConsciousness/atproto.dart)
- [GrowERP Flutter ERP](https://github.com/growerp/growerp)
- [mrverdant13/coverde](https://github.com/mrverdant13/coverde)

<Info>

Expand Down
32 changes: 32 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,38 @@ ignore:
- packages/melos_flutter_deps_check

command:
bootstrap:
environment:
sdk: '>=2.18.0 <3.0.0'
dependencies:
ansi_styles: ^0.3.1
args: ^2.0.0
cli_launcher: ^0.3.0
cli_util: '>=0.3.0 <0.5.0'
collection: ^1.14.12
conventional_commit: ^0.6.0+1
file: ^6.1.0
glob: ^2.1.0
graphs: ^2.1.0
http: ">=0.13.1 <2.0.0"
meta: ^1.1.8
mustache_template: ^2.0.0
path: ^1.7.0
platform: ^3.1.0
pool: ^1.4.0
prompts: ^2.0.0
pub_semver: ^2.0.0
pub_updater: ^0.3.0
pubspec: ^2.1.0
string_scanner: ^1.0.5
yaml: ^3.1.0
yaml_edit: ^2.0.2
dev_dependencies:
collection: ^1.15.0
mockito: ^5.1.0
test: ^1.17.5
path: ^1.7.0
yaml: ^3.1.0
version:
# Generate commit links in package changelogs.
linkToCommits: true
Expand Down
4 changes: 4 additions & 0 deletions packages/conventional_commit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.0+1

- **FIX**: commit scopes that contain "-" should be treated as valid scopes ([#496](https://github.com/invertase/melos/issues/496)). ([615c208e](https://github.com/invertase/melos/commit/615c208e08bb6c7a4c159fe0a06561b0b42edd50))

## 0.6.0

> Note: This release has breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/conventional_commit/lib/conventional_commit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final _mergeCommitPrefixRegex = RegExp('^Merged? (.*?:)?');

final _conventionalCommitHeaderRegex = RegExp(
r'(?<type>[a-zA-Z0-9_]+)(\((?<scope>[a-zA-Z0-9_,\s\*]+)\))?(?<breaking>!)?: ?(?<description>.+)',
r'(?<type>[a-zA-Z0-9_]+)(\((?<scope>[a-zA-Z0-9\-_,\s\*]+)\))?(?<breaking>!)?: ?(?<description>.+)',
);

final _breakingChangeRegex =
Expand Down
2 changes: 1 addition & 1 deletion packages/conventional_commit/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: conventional_commit
description:
Parse a git commit message using the Conventional Commits specification.
version: 0.6.0
version: 0.6.0+1
repository: https://github.com/invertase/melos/tree/main/packages/conventional_commit
issue_tracker: https://github.com/invertase/melos/issues

Expand Down
27 changes: 27 additions & 0 deletions packages/conventional_commit/test/conventional_commit_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ feat(*): a new something (#1234)
This also fixes an issue something else.
''';

const commitMessageHyphenScope = '''
feat(remote-config)!: add support for onConfigUpdated (#10647)
This PR is a breaking change for Remote Config since we're removing the ChangeNotifier mixin that came with FirebaseRemoteConfig. You should handle the state of the RemoteConfig using your own state provider.
''';

void main() {
group('$ConventionalCommit', () {
test('invalid commit messages', () {
Expand Down Expand Up @@ -121,6 +127,27 @@ void main() {
expect(commit.scopes, equals(['*']));
});

test('correctly handles messages with a scope that contains "-"', () {
final commit = ConventionalCommit.tryParse(commitMessageHyphenScope);
expect(commit, isNotNull);
expect(
commit!.description,
equals('add support for onConfigUpdated (#10647)'),
);
expect(
commit.body,
equals(
"This PR is a breaking change for Remote Config since we're removing "
'the ChangeNotifier mixin that came with FirebaseRemoteConfig. You '
'should handle the state of the RemoteConfig using your own state '
'provider.',
),
);
expect(commit.type, equals('feat'));
expect(commit.isBreakingChange, equals(true));
expect(commit.scopes, equals(['remote-config']));
});

test('header', () {
expect(
ConventionalCommit.tryParse('docs: foo bar')!.header,
Expand Down
24 changes: 24 additions & 0 deletions packages/melos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 3.2.0

- **REFACTOR**: fix analyzer issues ([#590](https://github.com/invertase/melos/issues/590)). ([2f19770e](https://github.com/invertase/melos/commit/2f19770eee9deff097d26202bece72bd6b2127a1))
- **FEAT**: support syncing common dependency versions ([#526](https://github.com/invertase/melos/issues/526)). ([39e5e499](https://github.com/invertase/melos/commit/39e5e499d71e95cf7794ae724ab2ccd3bb4e9fd5))
- **FEAT**: Expose `Changelog` and `ManualVersionChange` ([#538](https://github.com/invertase/melos/issues/538)). ([b049ed89](https://github.com/invertase/melos/commit/b049ed897402921a5b0f3b818e49b47e3b3bf4cf))
- **DOCS**: added link to `atproto.dart` ([#544](https://github.com/invertase/melos/issues/544)). ([aa891d82](https://github.com/invertase/melos/commit/aa891d8268f0aba7335ca274af747a15c9e72848))
- **DOCS**: growerp also use melos ([#551](https://github.com/invertase/melos/issues/551)). ([c679622f](https://github.com/invertase/melos/commit/c679622f1279107e31ec1d10d2b21c18877f7771))

## 3.1.1

- **FIX**: pass extra args to exec scripts ([#540](https://github.com/invertase/melos/issues/540)). ([27b2275d](https://github.com/invertase/melos/commit/27b2275d5f44cbc3b93e780c88618363afca0b55))
- **FIX**: generate correct path in `modules.xml` for package at workspace root ([#539](https://github.com/invertase/melos/issues/539)). ([712ae6c3](https://github.com/invertase/melos/commit/712ae6c332d2f50e9b62917f4ffeb9debb1279cc))

## 3.1.0

- **REFACTOR**: tidy up workspace name validation and fix docs ([#522](https://github.com/invertase/melos/issues/522)). ([3d76097d](https://github.com/invertase/melos/commit/3d76097db131b760368766ecbf7e133f2e1db23e))
- **FEAT**: improve output for multi-line scripts ([#524](https://github.com/invertase/melos/issues/524)). ([b4d71300](https://github.com/invertase/melos/commit/b4d7130006d7cdc04967c6b42f41850f56f71229))
- **FEAT**: set exit code to 1 when detecting cycles in `melos list` ([#523](https://github.com/invertase/melos/issues/523)). ([e2863e6f](https://github.com/invertase/melos/commit/e2863e6f043702da4d1b12d0ac837211beb8977e))
- **DOCS**: add `NetGlade/auto_mappr` to user of melos ([#508](https://github.com/invertase/melos/issues/508)). ([60c86195](https://github.com/invertase/melos/commit/60c86195c176d1b06f0bd983d903593465a15ce7))

## 3.0.1

- **DOCS**: pin docs to latest Melos release ([#373](https://github.com/invertase/melos/issues/373)). ([d1fd8d1f](https://github.com/invertase/melos/commit/d1fd8d1ff7f785fb625e34da65b2662bcabfbb60))

## 3.0.0

> Note: This release has breaking changes.
Expand Down
Loading

0 comments on commit 06c534e

Please sign in to comment.