From 2a94e9114bc1acae9fdd360e7b88425cc26dd352 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Wed, 12 Feb 2020 14:34:16 -0800 Subject: [PATCH] fix: trick renovate to update dependencies for us (#240) --- templates/typescript_gapic/package.json | 49 ++++++++++++++ templates/typescript_gapic/package.json.njk | 67 +------------------ typescript/src/templater.ts | 4 +- typescript/test/testdata/dlp/package.json | 49 ++++++++++++++ .../test/testdata/dlp/package.json.baseline | 50 +------------- .../test/testdata/keymanager/package.json | 49 ++++++++++++++ .../testdata/keymanager/package.json.baseline | 50 +------------- .../test/testdata/monitoring/package.json | 49 ++++++++++++++ .../testdata/monitoring/package.json.baseline | 50 +------------- typescript/test/testdata/redis/package.json | 49 ++++++++++++++ .../test/testdata/redis/package.json.baseline | 50 +------------- .../test/testdata/showcase/package.json | 49 ++++++++++++++ .../testdata/showcase/package.json.baseline | 50 +------------- .../test/testdata/texttospeech/package.json | 49 ++++++++++++++ .../texttospeech/package.json.baseline | 50 +------------- .../test/testdata/translate/package.json | 49 ++++++++++++++ .../testdata/translate/package.json.baseline | 50 +------------- typescript/test/util.ts | 7 +- 18 files changed, 407 insertions(+), 413 deletions(-) create mode 100644 templates/typescript_gapic/package.json mode change 100644 => 120000 templates/typescript_gapic/package.json.njk create mode 100644 typescript/test/testdata/dlp/package.json mode change 100644 => 120000 typescript/test/testdata/dlp/package.json.baseline create mode 100644 typescript/test/testdata/keymanager/package.json mode change 100644 => 120000 typescript/test/testdata/keymanager/package.json.baseline create mode 100644 typescript/test/testdata/monitoring/package.json mode change 100644 => 120000 typescript/test/testdata/monitoring/package.json.baseline create mode 100644 typescript/test/testdata/redis/package.json mode change 100644 => 120000 typescript/test/testdata/redis/package.json.baseline create mode 100644 typescript/test/testdata/showcase/package.json mode change 100644 => 120000 typescript/test/testdata/showcase/package.json.baseline create mode 100644 typescript/test/testdata/texttospeech/package.json mode change 100644 => 120000 typescript/test/testdata/texttospeech/package.json.baseline create mode 100644 typescript/test/testdata/translate/package.json mode change 100644 => 120000 typescript/test/testdata/translate/package.json.baseline diff --git a/templates/typescript_gapic/package.json b/templates/typescript_gapic/package.json new file mode 100644 index 000000000..380d8d6f8 --- /dev/null +++ b/templates/typescript_gapic/package.json @@ -0,0 +1,49 @@ +{ + "name": "{{ api.publishName }}", + "version": "0.1.0", + "description": "{{ api.naming.productName }} client for Node.js", + "repository": "googleapis/nodejs-{{ api.naming.productName.toKebabCase() }}", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/templates/typescript_gapic/package.json.njk b/templates/typescript_gapic/package.json.njk deleted file mode 100644 index b46657f1b..000000000 --- a/templates/typescript_gapic/package.json.njk +++ /dev/null @@ -1,66 +0,0 @@ -{#- - -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 - - 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. - --#} -{ - "name": "{{ api.publishName }}", - "version": "0.1.0", - "description": "{{ api.naming.productName }} client for Node.js", - "repository": "googleapis/nodejs-{{ api.naming.productName.toKebabCase() }}", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/templates/typescript_gapic/package.json.njk b/templates/typescript_gapic/package.json.njk new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/templates/typescript_gapic/package.json.njk @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/src/templater.ts b/typescript/src/templater.ts index 257d56d84..082758cde 100644 --- a/typescript/src/templater.ts +++ b/typescript/src/templater.ts @@ -28,7 +28,7 @@ const commonParameters: { [name: string]: string } = { const readFile = util.promisify(fs.readFile); const readDir = util.promisify(fs.readdir); -const lstat = util.promisify(fs.lstat); +const fsstat = util.promisify(fs.stat); async function recursiveFileList( basePath: string, @@ -41,7 +41,7 @@ async function recursiveFileList( const entries = await readDir(directory); for (const entry of entries) { const fullPath = path.join(directory, entry); - const stat = await lstat(fullPath); + const stat = await fsstat(fullPath); if (stat.isDirectory()) { dirQueue.push(fullPath); } else if (stat.isFile() && entry.match(nameRegex)) { diff --git a/typescript/test/testdata/dlp/package.json b/typescript/test/testdata/dlp/package.json new file mode 100644 index 000000000..969c592f4 --- /dev/null +++ b/typescript/test/testdata/dlp/package.json @@ -0,0 +1,49 @@ +{ + "name": "dlp", + "version": "0.1.0", + "description": "Dlp client for Node.js", + "repository": "googleapis/nodejs-dlp", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/dlp/package.json.baseline b/typescript/test/testdata/dlp/package.json.baseline deleted file mode 100644 index 969c592f4..000000000 --- a/typescript/test/testdata/dlp/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "dlp", - "version": "0.1.0", - "description": "Dlp client for Node.js", - "repository": "googleapis/nodejs-dlp", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/dlp/package.json.baseline b/typescript/test/testdata/dlp/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/dlp/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/keymanager/package.json b/typescript/test/testdata/keymanager/package.json new file mode 100644 index 000000000..8c3a18582 --- /dev/null +++ b/typescript/test/testdata/keymanager/package.json @@ -0,0 +1,49 @@ +{ + "name": "kms", + "version": "0.1.0", + "description": "Kms client for Node.js", + "repository": "googleapis/nodejs-kms", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/keymanager/package.json.baseline b/typescript/test/testdata/keymanager/package.json.baseline deleted file mode 100644 index 8c3a18582..000000000 --- a/typescript/test/testdata/keymanager/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "kms", - "version": "0.1.0", - "description": "Kms client for Node.js", - "repository": "googleapis/nodejs-kms", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/keymanager/package.json.baseline b/typescript/test/testdata/keymanager/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/keymanager/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/monitoring/package.json b/typescript/test/testdata/monitoring/package.json new file mode 100644 index 000000000..ff68a18c3 --- /dev/null +++ b/typescript/test/testdata/monitoring/package.json @@ -0,0 +1,49 @@ +{ + "name": "monitoring", + "version": "0.1.0", + "description": "Monitoring client for Node.js", + "repository": "googleapis/nodejs-monitoring", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/monitoring/package.json.baseline b/typescript/test/testdata/monitoring/package.json.baseline deleted file mode 100644 index ff68a18c3..000000000 --- a/typescript/test/testdata/monitoring/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "monitoring", - "version": "0.1.0", - "description": "Monitoring client for Node.js", - "repository": "googleapis/nodejs-monitoring", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/monitoring/package.json.baseline b/typescript/test/testdata/monitoring/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/monitoring/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/redis/package.json b/typescript/test/testdata/redis/package.json new file mode 100644 index 000000000..60c0ef4d2 --- /dev/null +++ b/typescript/test/testdata/redis/package.json @@ -0,0 +1,49 @@ +{ + "name": "redis", + "version": "0.1.0", + "description": "Redis client for Node.js", + "repository": "googleapis/nodejs-redis", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/redis/package.json.baseline b/typescript/test/testdata/redis/package.json.baseline deleted file mode 100644 index 60c0ef4d2..000000000 --- a/typescript/test/testdata/redis/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "redis", - "version": "0.1.0", - "description": "Redis client for Node.js", - "repository": "googleapis/nodejs-redis", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/redis/package.json.baseline b/typescript/test/testdata/redis/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/redis/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/showcase/package.json b/typescript/test/testdata/showcase/package.json new file mode 100644 index 000000000..4bd4ad2ba --- /dev/null +++ b/typescript/test/testdata/showcase/package.json @@ -0,0 +1,49 @@ +{ + "name": "showcase", + "version": "0.1.0", + "description": "Showcase client for Node.js", + "repository": "googleapis/nodejs-showcase", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/showcase/package.json.baseline b/typescript/test/testdata/showcase/package.json.baseline deleted file mode 100644 index 4bd4ad2ba..000000000 --- a/typescript/test/testdata/showcase/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "showcase", - "version": "0.1.0", - "description": "Showcase client for Node.js", - "repository": "googleapis/nodejs-showcase", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/showcase/package.json.baseline b/typescript/test/testdata/showcase/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/showcase/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/texttospeech/package.json b/typescript/test/testdata/texttospeech/package.json new file mode 100644 index 000000000..cbb862242 --- /dev/null +++ b/typescript/test/testdata/texttospeech/package.json @@ -0,0 +1,49 @@ +{ + "name": "@google-cloud/text-to-speech", + "version": "0.1.0", + "description": "Texttospeech client for Node.js", + "repository": "googleapis/nodejs-texttospeech", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/texttospeech/package.json.baseline b/typescript/test/testdata/texttospeech/package.json.baseline deleted file mode 100644 index cbb862242..000000000 --- a/typescript/test/testdata/texttospeech/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@google-cloud/text-to-speech", - "version": "0.1.0", - "description": "Texttospeech client for Node.js", - "repository": "googleapis/nodejs-texttospeech", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/texttospeech/package.json.baseline b/typescript/test/testdata/texttospeech/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/texttospeech/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/testdata/translate/package.json b/typescript/test/testdata/translate/package.json new file mode 100644 index 000000000..0c885bf9c --- /dev/null +++ b/typescript/test/testdata/translate/package.json @@ -0,0 +1,49 @@ +{ + "name": "translation", + "version": "0.1.0", + "description": "Translation client for Node.js", + "repository": "googleapis/nodejs-translation", + "license": "Apache-2.0", + "author": "Google LLC", + "files": [ + "build/src", + "build/protos" + ], + "main": "build/src/index.js", + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "predocs-test": "npm run docs", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^1.12.0" + }, + "devDependencies": { + "@types/mocha": "^5.2.5", + "@types/node": "^12.0.0", + "c8": "^6.0.0", + "gts": "^1.0.0", + "jsdoc": "^3.5.5", + "jsdoc-fresh": "^1.0.1", + "jsdoc-region-tag": "^1.0.2", + "linkinator": "^1.5.0", + "mocha": "^6.0.0", + "pack-n-play": "^1.0.0-2", + "null-loader": "^3.0.0", + "ts-loader": "^6.2.1", + "typescript": "~3.6.4", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "engines": { + "node": ">=8.13.0" + } +} diff --git a/typescript/test/testdata/translate/package.json.baseline b/typescript/test/testdata/translate/package.json.baseline deleted file mode 100644 index 0c885bf9c..000000000 --- a/typescript/test/testdata/translate/package.json.baseline +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "translation", - "version": "0.1.0", - "description": "Translation client for Node.js", - "repository": "googleapis/nodejs-translation", - "license": "Apache-2.0", - "author": "Google LLC", - "files": [ - "build/src", - "build/protos" - ], - "main": "build/src/index.js", - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "docs-test": "linkinator docs", - "fix": "gts fix", - "lint": "gts check", - "predocs-test": "npm run docs", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^1.12.0" - }, - "devDependencies": { - "@types/mocha": "^5.2.5", - "@types/node": "^12.0.0", - "c8": "^6.0.0", - "gts": "^1.0.0", - "jsdoc": "^3.5.5", - "jsdoc-fresh": "^1.0.1", - "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.5.0", - "mocha": "^6.0.0", - "pack-n-play": "^1.0.0-2", - "null-loader": "^3.0.0", - "ts-loader": "^6.2.1", - "typescript": "~3.6.4", - "webpack": "^4.41.2", - "webpack-cli": "^3.3.10" - }, - "engines": { - "node": ">=8.13.0" - } -} diff --git a/typescript/test/testdata/translate/package.json.baseline b/typescript/test/testdata/translate/package.json.baseline new file mode 120000 index 000000000..2ff8622f1 --- /dev/null +++ b/typescript/test/testdata/translate/package.json.baseline @@ -0,0 +1 @@ +package.json \ No newline at end of file diff --git a/typescript/test/util.ts b/typescript/test/util.ts index b7b85d204..2397d2ddf 100644 --- a/typescript/test/util.ts +++ b/typescript/test/util.ts @@ -124,9 +124,12 @@ function putFiletoStack(dir: string, fileStack: string[], dirStack: string[]) { const items = fs.readdirSync(dir); items.forEach(item => { const baselinePath = path.join(dir, item); - if (fs.lstatSync(baselinePath).isFile()) { + if ( + fs.statSync(baselinePath).isFile() && + baselinePath.match(/\.baseline$/) + ) { fileStack.push(baselinePath); - } else if (fs.lstatSync(baselinePath).isDirectory()) { + } else if (fs.statSync(baselinePath).isDirectory()) { dirStack.push(baselinePath); } });