From 7d41e42c78c773dfac61c298e7ae7232f8775249 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Tue, 12 Oct 2021 14:26:53 +0200 Subject: [PATCH] Prepare moor 4.6.0 release --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- docs/website.yaml | 4 ++-- drift_dev/CHANGELOG.md | 2 +- drift_dev/README.md | 3 ++- drift_dev/lib/src/cli/commands/migrate.dart | 9 +++++++-- drift_dev/pubspec.yaml | 2 +- moor/pubspec.yaml | 4 ++-- moor_generator/pubspec.yaml | 5 ++++- netlify.toml | 8 +++++++- 10 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6bda9334..c0704f16 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help improve moor +about: Create a report to help improve drift and moor title: '' labels: '' assignees: '' diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index cd7f86a5..f9587eab 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,7 +1,7 @@ contact_links: - name: Discussions url: https://github.com/simolus3/moor/discussions - about: "For questions on how to use moor, prefer a Q&A discussion over issues" + about: "For questions on how to use drift and moor, prefer a Q&A discussion over issues" - name: Gitter community url: https://gitter.im/moor-dart/community about: "Chat room for quick questions" diff --git a/docs/website.yaml b/docs/website.yaml index b8c9ffef..cba44bef 100644 --- a/docs/website.yaml +++ b/docs/website.yaml @@ -40,7 +40,7 @@ environments: base_url: "http://localhost:8080/" preview: minify: true - base_url: "https://moor.simonbinder.eu/" + base_url: "https://drift.simonbinder.eu/" prod: minify: true - base_url: "https://moor.simonbinder.eu/" + base_url: "https://drift.simonbinder.eu/" diff --git a/drift_dev/CHANGELOG.md b/drift_dev/CHANGELOG.md index 53fd146f..858d65dd 100644 --- a/drift_dev/CHANGELOG.md +++ b/drift_dev/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.0.0 +## 1.0.1 This is the initial release of the `drift_dev` package (formally known as `moor_generator`). For an overview of old `moor` releases, see its [changelog](https://pub.dev/packages/moor_generator/changelog). diff --git a/drift_dev/README.md b/drift_dev/README.md index 9b594c27..0db411f5 100644 --- a/drift_dev/README.md +++ b/drift_dev/README.md @@ -1,6 +1,7 @@ -# moor Generator +# Drift Generator This library contains the generator that turns your `Table` classes from drift into database code. +It should be used as a development dependency when using the `drift` package. Please see the homepage of [drift](https://drift.simonbinder.eu/) for details on how to use this package. diff --git a/drift_dev/lib/src/cli/commands/migrate.dart b/drift_dev/lib/src/cli/commands/migrate.dart index 00ef3ac1..680c7038 100644 --- a/drift_dev/lib/src/cli/commands/migrate.dart +++ b/drift_dev/lib/src/cli/commands/migrate.dart @@ -42,7 +42,7 @@ class MigrateCommand extends MoorCommand { await _applyToFile(file); } - final isRunningFlutter = argResults.arguments.contains('flutter'); + final isRunningFlutter = Platform.executable == 'flutter'; final formatCommand = isRunningFlutter ? 'flutter format .' : 'dart format .'; final pubGetCommand = isRunningFlutter ? 'flutter pub get' : 'dart pub get'; @@ -55,7 +55,12 @@ class MigrateCommand extends MoorCommand { print(' - Changed files might need formatting - run `$formatCommand`'); print(' - Download drift with `$pubGetCommand`'); print(' - Re-run the build with `$buildCommand`'); - print('Thanks for using ${styleCrossedOut.wrap('moor')} drift'); + + if (ansiOutputEnabled) { + print('Thanks for using ${styleCrossedOut.wrap('moor')} drift'); + } else { + print('Thanks for using drift'); + } } Future _applyToFile(File file) async { diff --git a/drift_dev/pubspec.yaml b/drift_dev/pubspec.yaml index 37edd01f..d94a19de 100644 --- a/drift_dev/pubspec.yaml +++ b/drift_dev/pubspec.yaml @@ -1,6 +1,6 @@ name: drift_dev description: Dev-dependency for users of drift. Contains a the generator and development tools. -version: 1.0.0 +version: 1.0.1 repository: https://github.com/simolus3/moor homepage: https://drift.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues diff --git a/moor/pubspec.yaml b/moor/pubspec.yaml index 5ab9dc52..f3f7ae99 100644 --- a/moor/pubspec.yaml +++ b/moor/pubspec.yaml @@ -1,6 +1,6 @@ name: moor description: Moor is a safe and reactive persistence library for Dart applications -version: 4.6.0-dev +version: 4.6.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -12,7 +12,7 @@ dependencies: async: ^2.5.0 convert: ^3.0.0 collection: ^1.15.0 - drift: ^4.6.0 + drift: ^1.0.0 meta: ^1.3.0 stream_channel: ^2.1.0 sqlite3: ^1.0.0 diff --git a/moor_generator/pubspec.yaml b/moor_generator/pubspec.yaml index 1aa91616..3f61f8f2 100644 --- a/moor_generator/pubspec.yaml +++ b/moor_generator/pubspec.yaml @@ -1,6 +1,6 @@ name: moor_generator description: Dev-dependency to generate table and dataclasses together with the moor package. -version: 4.5.1 +version: 4.6.0 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -10,6 +10,9 @@ environment: dependencies: drift_dev: ^1.0.0 + # When users depend on the latest moor_generator, they should also get the latest moor for + # the migration to work + moor: ^4.6.0 executables: moor_generator: diff --git a/netlify.toml b/netlify.toml index 340fa313..527b20a0 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,7 +5,13 @@ [[redirects]] from = "https://moor.netlify.app/*" - to = "https://moor.simonbinder.eu/:splat" + to = "https://drift.simonbinder.eu/:splat" + status = 301 + force = true + +[[redirects]] + from = "https://moor.simonbinder.eu/*" + to = "https://drift.simonbinder.eu/:splat" status = 301 force = true