Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/nodejs-storage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c2ad5747f5da6630e911623bb296d676c45c042d
Choose a base ref
...
head repository: googleapis/nodejs-storage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 29427ae045cba1bbf155eb4a7a1eb66ee28e7b90
Choose a head ref

Commits on Apr 5, 2019

  1. Copy the full SHA
    ce02c27 View commit details
  2. refactor: use execSync for tests (#664)

    * refactor: use execSync for tests
    
    * turn to sync functions
    
    * remove async function
    
    * fixit
    
    * refactor: wrap execSync with encoding: utf-8
    
    * lint
    
    * loosen regexes
    
    * loosen assertions
    JustinBeckwith authored and jkwlui committed Apr 5, 2019
    Copy the full SHA
    d2bbcf3 View commit details

Commits on Apr 7, 2019

  1. Copy the full SHA
    da42bed View commit details

Commits on Apr 16, 2019

  1. Copy the full SHA
    73b53a1 View commit details

Commits on Apr 18, 2019

  1. Copy the full SHA
    e808c0f View commit details

Commits on Apr 27, 2019

  1. Copy the full SHA
    71c56f7 View commit details

Commits on Apr 29, 2019

  1. Copy the full SHA
    08f376c View commit details

Commits on Apr 30, 2019

  1. Copy the full SHA
    8b40e6a View commit details

Commits on May 1, 2019

  1. fix: validate action of getSignedUrl() function (#684)

    * validate action of getSignedUrl() function
    
    * use existing enum for validation
    AVaksman authored May 1, 2019
    Copy the full SHA
    1b09d24 View commit details

Commits on May 2, 2019

  1. Copy the full SHA
    1135020 View commit details
  2. Copy the full SHA
    6a1fa0f View commit details

Commits on May 3, 2019

  1. Copy the full SHA
    5df2f83 View commit details
  2. Copy the full SHA
    a39ff1f View commit details
  3. Copy the full SHA
    8823579 View commit details
  4. Copy the full SHA
    5d55817 View commit details

Commits on May 6, 2019

  1. Copy the full SHA
    468cbc2 View commit details
  2. Copy the full SHA
    d3d3728 View commit details
  3. Copy the full SHA
    b361eb2 View commit details

Commits on May 7, 2019

  1. Copy the full SHA
    32db4b4 View commit details
  2. Copy the full SHA
    ada995e View commit details
  3. Copy the full SHA
    42937a8 View commit details

Commits on May 9, 2019

  1. Copy the full SHA
    c94cc72 View commit details

Commits on May 11, 2019

  1. Copy the full SHA
    72a9f51 View commit details

Commits on May 13, 2019

  1. Copy the full SHA
    b1bb6af View commit details

Commits on May 17, 2019

  1. Copy the full SHA
    3ee1a2c View commit details
  2. build: add new kokoro config for coverage and release-please (#713)

    * build: add new kokoro config for release-please and coverage
    
    * build: actually commit the config
    
    * fix: do not fail test if nyc did not run
    bcoe authored and JustinBeckwith committed May 17, 2019
    Copy the full SHA
    59f5f72 View commit details
  3. Copy the full SHA
    79305b7 View commit details

Commits on May 23, 2019

  1. Copy the full SHA
    135fb45 View commit details

Commits on May 24, 2019

  1. Copy the full SHA
    7742bb0 View commit details
  2. Copy the full SHA
    e241719 View commit details

Commits on May 28, 2019

  1. Copy the full SHA
    26fb5cf View commit details

Commits on May 29, 2019

  1. Copy the full SHA
    b2f8a74 View commit details

Commits on May 30, 2019

  1. Copy the full SHA
    f86cadb View commit details
  2. Copy the full SHA
    988345d View commit details

Commits on May 31, 2019

  1. Copy the full SHA
    61eeb64 View commit details

Commits on Jun 10, 2019

  1. Copy the full SHA
    f24439d View commit details

Commits on Jun 11, 2019

  1. Copy the full SHA
    7071f26 View commit details
  2. Copy the full SHA
    32ce2f1 View commit details

Commits on Jun 13, 2019

  1. Copy the full SHA
    a637f99 View commit details

Commits on Jun 14, 2019

  1. chore: release 3.0.0 (#719)

    * updated CHANGELOG.md
    
    * updated package.json
    
    * updated samples/package.json
    yoshi-automation authored and JustinBeckwith committed Jun 14, 2019
    Copy the full SHA
    29427ae View commit details
Showing with 5,246 additions and 4,056 deletions.
  1. +0 −3 .clang-format
  2. +10 −0 .kokoro/continuous/node10/common.cfg
  3. +0 −12 .kokoro/continuous/node10/system-test-grpcjs.cfg
  4. +19 −0 .kokoro/continuous/node10/test.cfg
  5. +0 −24 .kokoro/continuous/node6/common.cfg
  6. 0 .kokoro/continuous/node6/test.cfg
  7. +0 −9 .kokoro/continuous/node8/test.cfg
  8. +1 −1 .kokoro/docs.sh
  9. +7 −5 .kokoro/lint.sh
  10. +10 −0 .kokoro/presubmit/node10/common.cfg
  11. +0 −12 .kokoro/presubmit/node10/system-test-grpcjs.cfg
  12. +0 −24 .kokoro/presubmit/node6/common.cfg
  13. 0 .kokoro/presubmit/node6/test.cfg
  14. +0 −9 .kokoro/presubmit/node8/test.cfg
  15. +8 −0 .kokoro/release/common.cfg
  16. +26 −0 .kokoro/release/docs.cfg
  17. +50 −0 .kokoro/release/docs.sh
  18. +23 −8 .kokoro/samples-test.sh
  19. +14 −1 .kokoro/system-test.sh
  20. +9 −1 .kokoro/test.bat
  21. +21 −3 .kokoro/test.sh
  22. +1 −1 .kokoro/trampoline.sh
  23. +18 −23 .nycrc
  24. +2 −2 .repo-metadata.json
  25. +32 −1 CHANGELOG.md
  26. +1 −1 README.md
  27. +13 −10 conformance-test/v4SignedUrl.ts
  28. +23 −25 package.json
  29. +2 −6 samples/bucketLock.js
  30. +2 −3 samples/package.json
  31. +21 −23 samples/system-test/acl.test.js
  32. +26 −27 samples/system-test/bucketLock.test.js
  33. +13 −14 samples/system-test/buckets.test.js
  34. +14 −15 samples/system-test/encryption.test.js
  35. +24 −25 samples/system-test/files.test.js
  36. +6 −5 samples/system-test/iam.test.js
  37. +7 −6 samples/system-test/notifications.test.js
  38. +4 −2 samples/system-test/quickstart.test.js
  39. +20 −19 samples/system-test/requesterPays.test.js
  40. +161 −127 src/acl.ts
  41. +538 −395 src/bucket.ts
  42. +15 −18 src/channel.ts
  43. +613 −423 src/file.ts
  44. +106 −78 src/iam.ts
  45. +174 −6 src/index.ts
  46. +78 −64 src/notification.ts
  47. +127 −93 src/storage.ts
  48. +10 −6 src/util.ts
  49. +2 −2 synth.metadata
  50. +1,398 −1,363 system-test/storage.ts
  51. +43 −39 test/acl.ts
  52. +423 −302 test/bucket.ts
  53. +23 −15 test/channel.ts
  54. +818 −609 test/file.ts
  55. +34 −28 test/iam.ts
  56. +199 −128 test/index.ts
  57. +57 −40 test/notification.ts
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

10 changes: 10 additions & 0 deletions .kokoro/continuous/node10/common.cfg
Original file line number Diff line number Diff line change
@@ -7,6 +7,16 @@ action {
}
}

# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "dpebot_codecov_token"
}
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

12 changes: 0 additions & 12 deletions .kokoro/continuous/node10/system-test-grpcjs.cfg

This file was deleted.

19 changes: 19 additions & 0 deletions .kokoro/continuous/node10/test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "dpebot_codecov_token"
}
}
}

# token used by release-please to keep an up-to-date release PR.
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}
24 changes: 0 additions & 24 deletions .kokoro/continuous/node6/common.cfg

This file was deleted.

Empty file removed .kokoro/continuous/node6/test.cfg
Empty file.
9 changes: 0 additions & 9 deletions .kokoro/continuous/node8/test.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "dpebot_codecov_token"
}
}
}
2 changes: 1 addition & 1 deletion .kokoro/docs.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail
set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

12 changes: 7 additions & 5 deletions .kokoro/lint.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail
set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

@@ -23,9 +23,11 @@ cd $(dirname $0)/..
npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..
if [ -f samples/package.json ]; then
cd samples/
npm link ../
npm install
cd ..
fi

npm run lint
10 changes: 10 additions & 0 deletions .kokoro/presubmit/node10/common.cfg
Original file line number Diff line number Diff line change
@@ -7,6 +7,16 @@ action {
}
}

# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "dpebot_codecov_token"
}
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

12 changes: 0 additions & 12 deletions .kokoro/presubmit/node10/system-test-grpcjs.cfg

This file was deleted.

24 changes: 0 additions & 24 deletions .kokoro/presubmit/node6/common.cfg

This file was deleted.

Empty file removed .kokoro/presubmit/node6/test.cfg
Empty file.
9 changes: 0 additions & 9 deletions .kokoro/presubmit/node8/test.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "dpebot_codecov_token"
}
}
}
8 changes: 8 additions & 0 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}
26 changes: 26 additions & 0 deletions .kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# service account used to publish up-to-date docs.
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "docuploader_service_account"
}
}
}

# doc publications use a Python image.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-storage/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-storage/.kokoro/release/docs.sh"
}
50 changes: 50 additions & 0 deletions .kokoro/release/docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eo pipefail

# build jsdocs (Python is installed on the Node 10 docker image).
if [[ -z "$CREDENTIALS" ]]; then
# if CREDENTIALS are explicitly set, assume we're testing locally
# and don't set NPM_CONFIG_PREFIX.
export NPM_CONFIG_PREFIX=/home/node/.npm-global
export PATH="$PATH:/home/node/.npm-global/bin"
cd $(dirname $0)/../..
fi
npm install
npm run docs

# create docs.metadata, based on package.json and .repo-metadata.json.
npm i json@9.0.6 -g
python3 -m pip install --user gcp-docuploader
python3 -m docuploader create-metadata \
--name=$(cat .repo-metadata.json | json name) \
--version=$(cat package.json | json version) \
--language=$(cat .repo-metadata.json | json language) \
--distribution-name=$(cat .repo-metadata.json | json distribution_name) \
--product-page=$(cat .repo-metadata.json | json product_documentation) \
--github-repository=$(cat .repo-metadata.json | json repo) \
--issue-tracker=$(cat .repo-metadata.json | json issue_tracker)
cp docs.metadata ./docs/docs.metadata

# deploy the docs.
if [[ -z "$CREDENTIALS" ]]; then
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
fi
if [[ -z "$BUCKET" ]]; then
BUCKET=docs-staging
fi
python3 -m docuploader upload ./docs --credentials $CREDENTIALS --staging-bucket $BUCKET
31 changes: 23 additions & 8 deletions .kokoro/samples-test.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail
set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

@@ -31,12 +31,27 @@ if [ -f .kokoro/pre-samples-test.sh ]; then
set -x
fi

npm install
if [ -f samples/package.json ]; then
npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..
# Install and link samples
cd samples/
npm link ../
npm install
cd ..

npm run samples-test
npm run samples-test
fi

# codecov combines coverage across integration and unit tests. Include
# the logic below for any environment you wish to collect coverage for:
COVERAGE_NODE=10
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
NYC_BIN=./node_modules/nyc/bin/nyc.js
if [ -f "$NYC_BIN" ]; then
$NYC_BIN report || true
fi
bash $KOKORO_GFILE_DIR/codecov.sh
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi
15 changes: 14 additions & 1 deletion .kokoro/system-test.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail
set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

@@ -34,3 +34,16 @@ fi
npm install

npm run system-test

# codecov combines coverage across integration and unit tests. Include
# the logic below for any environment you wish to collect coverage for:
COVERAGE_NODE=10
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
NYC_BIN=./node_modules/nyc/bin/nyc.js
if [ -f "$NYC_BIN" ]; then
$NYC_BIN report || true
fi
bash $KOKORO_GFILE_DIR/codecov.sh
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi
10 changes: 9 additions & 1 deletion .kokoro/test.bat
Original file line number Diff line number Diff line change
@@ -17,7 +17,15 @@
cd /d %~dp0
cd ..

call npm install -g npm@latest || goto :error
@rem The image we're currently running has a broken version of Node.js enabled
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
@rem install npm for v10.15.3.
call nvm use v8.9.1 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
call nvm use v10.15.3 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error

call npm install || goto :error
call npm run test || goto :error

24 changes: 21 additions & 3 deletions .kokoro/test.sh
Original file line number Diff line number Diff line change
@@ -14,14 +14,32 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail
set -eo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

cd $(dirname $0)/..

npm install
npm test
./node_modules/nyc/bin/nyc.js report

bash $KOKORO_GFILE_DIR/codecov.sh
# codecov combines coverage across integration and unit tests. Include
# the logic below for any environment you wish to collect coverage for:
COVERAGE_NODE=10
if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then
NYC_BIN=./node_modules/nyc/bin/nyc.js
if [ -f "$NYC_BIN" ]; then
$NYC_BIN report || true
fi
bash $KOKORO_GFILE_DIR/codecov.sh
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi

# if the GITHUB_TOKEN is set, we kick off a task to update the release-PR.
GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) || true
if [ "$GITHUB_TOKEN" ]; then
npx release-please release-pr --token=$GITHUB_TOKEN \
--repo-url=googleapis/nodejs-storage \
--package-name=@google-cloud/storage
fi
Loading