Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

feat: convert to TypeScript #2

Merged
merged 3 commits into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
src/**/doc/*
build/
docs/
protos/
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Thanks for stopping by to let us know something could be better!

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- Search the issues already opened: https://github.com/googleapis/nodejs-workflows/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js

Expand All @@ -21,7 +21,7 @@ If you are still having issues, please be sure to include as much information as
- OS:
- Node.js version:
- npm version:
- `@google-cloud/workflows` version:
- `workflows` version:

#### Steps to reproduce

Expand Down
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com//issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
2 changes: 1 addition & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
releaseType: javascript
releaseType: node
34 changes: 17 additions & 17 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/*!
* Copyright 2018 Google LLC. All Rights Reserved.
*
* 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
*
* http://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.
*/
// 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.
//

'use strict';

Expand All @@ -26,7 +25,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
Expand All @@ -39,7 +39,7 @@ module.exports = {
copyright: 'Copyright 2018 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/workflows',
systemName: 'workflows',
theme: 'lumen'
},
markdown: {
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,5 +20,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/continuous/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -30,5 +30,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/docs.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/docs.sh"
value: "github/nodejs-workflows/.kokoro/docs.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/lint.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/lint.sh"
value: "github/nodejs-workflows/.kokoro/lint.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/samples-test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/samples-test.sh"
value: "github/nodejs-workflows/.kokoro/samples-test.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/system-test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/system-test.sh"
value: "github/nodejs-workflows/.kokoro/system-test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/continuous/node12/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,5 +20,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/continuous/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,5 +20,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -30,5 +30,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/docs.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/docs.sh"
value: "github/nodejs-workflows/.kokoro/docs.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/lint.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/lint.sh"
value: "github/nodejs-workflows/.kokoro/lint.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/samples-test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/samples-test.sh"
value: "github/nodejs-workflows/.kokoro/samples-test.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/system-test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/system-test.sh"
value: "github/nodejs-workflows/.kokoro/system-test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/node12/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,5 +20,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -20,5 +20,5 @@ env_vars: {
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/test.sh"
value: "github/nodejs-workflows/.kokoro/test.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/presubmit/windows/test.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Use the test file directly
build_file: "google-cloud-node/.kokoro/test.bat"
build_file: "nodejs-workflows/.kokoro/test.bat"
2 changes: 1 addition & 1 deletion .kokoro/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /

cd $(dirname $0)/..

NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-workflows-npm-token)
NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_workflows-npm-token)
echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc

npm install
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/release/docs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ env_vars: {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/release/docs.sh"
value: "github/nodejs-workflows/.kokoro/release/docs.sh"
}
6 changes: 3 additions & 3 deletions .kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google-cloud-workflows-npm-token"
keyname: "workflows-npm-token"
}
}
}
Expand All @@ -60,7 +60,7 @@ before_action {
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "google-cloud-node/.kokoro/trampoline.sh"
build_file: "nodejs-workflows/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
Expand All @@ -70,5 +70,5 @@ env_vars: {

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-cloud-node/.kokoro/publish.sh"
value: "github/nodejs-workflows/.kokoro/publish.sh"
}
1 change: 0 additions & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"**/docs",
"**/samples",
"**/scripts",
"**/src/**/v*/**/*.js",
"**/protos",
"**/test",
".jsdoc.js",
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ accept your pull requests.
1. Ensure that your code adheres to the existing style in the code to which
you are contributing.
1. Ensure that your code has an appropriate set of tests which all pass.
1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling.
1. Submit a pull request.

## Running the tests
Expand All @@ -46,8 +47,17 @@ accept your pull requests.

1. Run the tests:

# Run unit tests.
npm test

# Run sample integration tests.
gcloud auth application-default login
npm run samples-test

# Run all system tests.
gcloud auth application-default login
npm run system-test

1. Lint (and maybe fix) any changes:

npm run fix
Expand Down
7 changes: 7 additions & 0 deletions linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com"
]
}
Loading