Skip to content

Commit a3d1c44

Browse files
authored
Merge pull request #14 from dart-lang/merge-gcloud-package
transfer package:gcloud
2 parents 4151ca3 + a42de7f commit a3d1c44

Some content is hidden

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

53 files changed

+12588
-0
lines changed

.github/workflows/gcloud.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: package:gcloud
2+
permissions: read-all
3+
4+
on:
5+
pull_request:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/gcloud.yml'
9+
- 'pkgs/gcloud/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/gcloud.yml'
14+
- 'pkgs/gcloud/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
jobs:
22+
# Check code formatting and static analysis on a single OS (linux)
23+
# against Dart dev.
24+
analyze:
25+
runs-on: ubuntu-latest
26+
defaults:
27+
run:
28+
working-directory: pkgs/gcloud
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
sdk: [dev]
33+
steps:
34+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
35+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
- id: install
39+
name: Install dependencies
40+
run: dart pub get
41+
- name: Check formatting
42+
run: dart format --output=none --set-exit-if-changed .
43+
if: always() && steps.install.outcome == 'success'
44+
- name: Analyze code
45+
run: dart analyze --fatal-infos
46+
if: always() && steps.install.outcome == 'success'
47+
48+
# Run tests on a matrix consisting of two dimensions:
49+
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
50+
# 2. release channel: dev
51+
test:
52+
needs: analyze
53+
runs-on: ${{ matrix.os }}
54+
defaults:
55+
run:
56+
working-directory: pkgs/gcloud
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
# Add macos-latest and/or windows-latest if relevant for this package.
61+
os: [ubuntu-latest]
62+
sdk: [2.19.0, dev]
63+
steps:
64+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
65+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
66+
with:
67+
sdk: ${{ matrix.sdk }}
68+
- id: install
69+
name: Install dependencies
70+
run: dart pub get
71+
- name: Run VM tests
72+
run: dart test --platform vm -P ci
73+
if: always() && steps.install.outcome == 'success'

pkgs/gcloud/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.dart_tool/
2+
pubspec.lock
3+
packages
4+
.pub
5+
.packages
6+
.idea

pkgs/gcloud/.status

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
*/packages/*: Skip
2+
*/*/packages/*: Skip
3+
*/*/*/packages/*: Skip
4+
5+
# We do not run the e2e tests inside the build/ directory in order to prevent
6+
# ./tools/test.py from running several e2e in parallel.
7+
build/test/db_all_e2e_test: Skip
8+
build/test/storage/e2e_test: Skip
9+
build/test/pubsub/pubsub_e2e_test: Skip
10+
11+
# This test is slow because
12+
# - eventual consistency forces us to put in sleep()s
13+
# - it does e2e testing
14+
# - it combines several tests to avoid concurrent tests touching the same data
15+
test/db_all_e2e_test: Slow, Pass
16+
17+
# This test is slow because
18+
# - it does e2e testing
19+
test/pubsub/pubsub_e2e_test: Slow, Pass
20+
21+
[ $browser ]
22+
build/test/storage/e2e_test: Skip
23+
test/storage/e2e_test: Skip
24+
25+
build/test/db_all_e2e_test: Skip
26+
test/db_all_e2e_test: Skip
27+
28+
build/test/pubsub/pubsub_e2e_test: Skip
29+
test/pubsub/pubsub_e2e_test: Skip
30+
31+
# Imports common_e2e.dart, which uses dart:io
32+
build/test/storage/storage_test: Skip
33+
test/storage/storage_test: Skip
34+
35+
build/test/pubsub/pubsub_test: Skip
36+
test/pubsub/pubsub_test: Skip
37+
38+
[ $compiler == dart2js ]
39+
*: Skip

pkgs/gcloud/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Dart project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.

pkgs/gcloud/CHANGELOG.md

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
## 0.8.14
2+
- Support override metadata properties in `copyObject`.
3+
4+
## 0.8.13
5+
- Support the latest version `^13.0.0` of the `googleapis` package.
6+
7+
## 0.8.12
8+
- Support the latest version 12.0.0 of the `googleapis` package.
9+
10+
## 0.8.11
11+
- After the first `Page` created by `Datastore.withRetry()` retries were not
12+
happening. This is now fixed, ensuring that `Page.next()` will always retry
13+
when `Datastore` is wrapped with `Datastore.withRetry()`.
14+
- Calling with `wait: false` in `Subscription.pull(wait: false)` for `PubSub`
15+
have been deprecated.
16+
17+
## 0.8.10
18+
19+
- Widen the SDK constraint to support Dart 3.0
20+
- Support retrying Datastore operations.
21+
22+
## 0.8.9
23+
24+
- Support the latest version 1.0.0 of the `http` package.
25+
- Support the latest version 12.0.0 of the `googleapis` package.
26+
27+
## 0.8.8
28+
29+
- Require Dart 2.19
30+
- Add topics in `pubspec.yaml`.
31+
32+
## 0.8.7
33+
34+
- Fix `Bucket.write` when size is below 1MB.
35+
36+
## 0.8.6
37+
38+
- Throttle streams piped into `Bucket.write` when the size is not known
39+
beforehand.
40+
- Support the latest version 9.0.0 of the `googleapis` package.
41+
42+
## 0.8.5
43+
44+
- Support the latest version 7.0.0 of the `googleapis` package.
45+
46+
## 0.8.4
47+
48+
- Support the latest version 6.0.0 of the `googleapis` package.
49+
50+
## 0.8.3
51+
52+
- Support the latest version of the `googleapis` package.
53+
54+
## 0.8.2
55+
56+
* **BREAKING CHANGE:** `Page.next()` throws if `Page.isLast`, this change only
57+
affects code not migrated to null-safety, when paging through results in
58+
pub-sub and storage without checking `Page.isLast`.
59+
Code fully migrated to null-safety will have experienced a runtime null check
60+
error, and paging code for datastore already throw an `Error`.
61+
62+
## 0.8.1
63+
64+
* `lookupOrNull` method in `DatastoreDB` and `Transaction`.
65+
66+
## 0.8.0
67+
68+
* Require Dart 2.12 or later
69+
* Migration to null safety.
70+
71+
## 0.7.3
72+
* Fixed issue in reflection code affecting `Model<int>` and `Model<String>`,
73+
but not `Model<dynamic>`.
74+
75+
## 0.7.2
76+
77+
* Added `delimiter` to `Bucket.list` and `Bucket.page`
78+
(`0.7.1` only added them the implementation).
79+
80+
## 0.7.1
81+
82+
* Added `delimiter` to `Bucket.list` and `Bucket.page`.
83+
* Fix typing of `ExpandoModel` to `ExpandoModel<T>` as we should have done in
84+
version `0.7.0`.
85+
86+
## 0.7.0+2
87+
88+
* Upgrade dependency on `_discoveryapis_commons`, changing `ApiRequestError`
89+
from an `Error` to an `Exception`. Version constraints on
90+
`_discoveryapis_commons` allows both new and old versions.
91+
92+
## 0.7.0+1
93+
94+
* Fix path separator in Bucket.list().
95+
96+
## 0.7.0
97+
98+
* **BREAKING CHANGE:** Add generics support for `Model.id`.
99+
It is now possible to define the type of the id a model has (either `String`
100+
or `int`). A model can now be defined as
101+
`class MyModel extends Model<String> {}` and `myModel.id` will then
102+
be of type `String` and `myModel.key` of type `Key<String>`.
103+
104+
## 0.6.4
105+
106+
* Require minimum Dart SDK `2.3.0`.
107+
108+
## 0.6.3
109+
110+
* Added `DatastoreDB.lookupValue()`
111+
112+
## 0.6.2
113+
114+
* Fixed bug in `Transaction.rollback()`.
115+
116+
## 0.6.1
117+
118+
* Added examples.
119+
* Fixed formatting and lints.
120+
* Allow `Model` classes to contain constructors with optional or named
121+
arguments (as long as they're annotated with `@required`).
122+
* Add generics support to `withTransaction()`.
123+
124+
## 0.6.0+4
125+
126+
* Updated package description.
127+
* Added an example showing how to use Google Cloud Storage.
128+
129+
## 0.6.0+3
130+
131+
* Fixed code formatting and lints.
132+
133+
## 0.6.0+2
134+
135+
* Support the latest `pkg:http`.
136+
137+
## 0.6.0+1
138+
139+
* Add explicit dependency to `package:_discoveryapis_commons`
140+
* Widen sdk constraint to <3.0.0
141+
142+
## 0.6.0
143+
144+
* **BREAKING CHANGE:** Add generics support. Instead of writing
145+
`db.query(Person).run()` and getting back a generic `Stream<Model>`, you now
146+
write `db.query<Person>().run()` and get `Stream<Person>`.
147+
The same goes for `.lookup([key])`, which can now be written as
148+
`.lookup<Person>([key])` and will return a `List<Person>`.
149+
150+
## 0.5.0
151+
152+
* Fixes to support Dart 2.
153+
154+
## 0.4.0+1
155+
156+
* Made a number of strong-mode improvements.
157+
158+
* Updated dependency on `googleapis` and `googleapis_beta`.
159+
160+
## 0.4.0
161+
162+
* Remove support for `FilterRelation.In` and "propertyname IN" for queries:
163+
This is not supported by the newer APIs and was originally part of fat-client
164+
libraries which performed multiple queries for each item in the list.
165+
166+
* Adds optional `forComparison` named argument to `Property.encodeValue` which
167+
will be set to `true` when encoding a value for comparison in queries.
168+
169+
* Upgrade to newer versions of `package:googleapis` and `package:googleapis_beta`
170+
171+
## 0.3.0
172+
173+
* Upgrade to use stable `package:googleapis/datastore/v1.dart`.
174+
175+
* The internal [DatastoreImpl] class takes now a project name without the `s~`
176+
prefix.
177+
178+
## 0.2.0+14
179+
180+
* Fix analyzer warning.
181+
182+
## 0.2.0+13
183+
184+
* Remove crypto dependency and upgrade dart dependency to >=1.13 since
185+
this dart version provides the Base64 codec.
186+
187+
## 0.2.0+11
188+
189+
* Throw a [StateError] in case a query returned a kind for which there was no
190+
model registered.
191+
192+
## 0.2.0+10
193+
194+
* Address analyzer warnings.
195+
196+
## 0.2.0+9
197+
198+
* Support value transformation in `db.query().filter()`.
199+
* Widen constraint on `googleapis` and `googleapis_beta`.
200+
201+
## 0.2.0+8
202+
203+
* Widen constraint on `googleapis` and `googleapis_beta`.
204+
205+
## 0.2.0+4
206+
207+
* `Storage.read` now honors `offset` and `length` arguments.
208+
209+
## 0.2.0+2
210+
211+
* Widen constraint on `googleapis/googleapis_beta`
212+
213+
## 0.2.0+1
214+
215+
* Fix broken import of package:googleapis/common/common.dart.
216+
217+
## 0.2.0
218+
219+
* Add support for Cloud Pub/Sub.
220+
* Require Dart version 1.9.
221+
222+
## 0.1.4+2
223+
224+
* Enforce fully populated entity keys in a number of places.
225+
226+
## 0.1.4+1
227+
228+
* Deduce the query partition automatically from query ancestor key.
229+
230+
## 0.1.4
231+
232+
* Added optional `defaultPartition` parameter to the constructor of
233+
`DatastoreDB`.
234+
235+
## 0.1.3+2
236+
237+
* Widened googleapis/googleapis_beta constraints in pubspec.yaml.
238+
239+
## 0.1.3+1
240+
241+
* Change the service scope keys to non-private symbols.
242+
243+
## 0.1.3
244+
245+
* Widen package:googleapis dependency constraint in pubspec.yaml.
246+
* Bugfix in `package:appengine/db.dart`: Correctly handle ListProperties
247+
of length 1.
248+
249+
## 0.1.2
250+
251+
* Introduced `package:gcloud/service_scope.dart` library.
252+
* Added global getters for getting gcloud services from the current service
253+
scope.
254+
* Added an `package:gcloud/http.dart` library using service scopes.
255+
256+
## 0.1.1
257+
258+
* Increased version constraint on googleapis{,_auth,_beta}.
259+
260+
* Removed unused imports.
261+
262+
## 0.1.0
263+
264+
* First release.

0 commit comments

Comments
 (0)