Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
build!: update typescript/gts (#243)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: typescript@3.7.x introduced backwards incompatibilities
  • Loading branch information
bcoe authored Mar 20, 2020
1 parent 415e32f commit f910f07
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
15 changes: 0 additions & 15 deletions .eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [8, 10, 12, 13]
node: [10, 12, 13]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
Expand Down
8 changes: 5 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/*
samples/node_modules/*
src/**/doc/*
**/node_modules
**/.coverage
build/
docs/
protos/
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

17 changes: 17 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 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.

module.exports = {
...require('gts/.prettierrc.json')
}
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
"check": "gts check && npm run license-check",
"clean": "gts clean",
"compile": "tsc -p .",
"fix": "gts fix && eslint --fix '**/*.js'",
"fix": "gts fix",
"prepare": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run check",
"license-check": "jsgl --local .",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"presystem-test": "npm run compile",
"system-test": "mocha build/system-test",
"lint": "gts check && eslint '**/*.js'",
"lint": "gts check",
"docs": "compodoc src/",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
Expand All @@ -41,18 +40,14 @@
"@types/mocha": "^7.0.0",
"@types/node": "^10.0.9",
"@types/node-forge": "^0.9.0",
"c8": "^7.0.0",
"codecov": "^3.0.2",
"eslint": "^6.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "^1.0.0",
"gts": "^2.0.0-alpha.4",
"js-green-licenses": "^1.0.0",
"linkinator": "^2.0.0",
"mocha": "^7.0.0",
"c8": "^7.0.0",
"prettier": "^1.15.3",
"typescript": "3.6.4",
"linkinator": "^2.0.0"
"typescript": "^3.8.3"
},
"engines": {
"node": ">=10"
Expand Down
4 changes: 2 additions & 2 deletions src/bin/gp12-pem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const p12Path = argv[2];

if (!p12Path) {
console.error('Please specify a *.p12 file to convert.');
process.exit(1);
process.exitCode = 1;
}

gp12.getPem(p12Path, (err, pem) => {
if (err) {
console.log(err);
process.exit(1);
process.exitCode = 1;
} else {
console.log(pem);
}
Expand Down
12 changes: 6 additions & 6 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ describe('GoogleP12Pem', () => {

it('should throw ENOENT on bad filename with no callback', done => {
getPem('./badfilename.p12')
.then(pem => {
.then(() => {
assert.fail('Returned pem when it should have been rejected');
})
.catch(e => {
.catch(() => {
done();
});
});

it('should throw error on bad .p12 with no callback', done => {
getPem(BADP12FILE)
.then(pem => {
.then(() => {
assert.fail('Returned pem when it should have been rejected');
})
.catch(e => {
.catch(() => {
done();
});
});

it('should return error on bad .p12 in callback', done => {
assert.doesNotThrow(() => {
getPem(BADP12FILE, (err, pem) => {
getPem(BADP12FILE, err => {
assert(err);
if (err) {
assert(err.message.indexOf('Too few bytes to read') > -1);
Expand All @@ -82,7 +82,7 @@ describe('GoogleP12Pem', () => {
.then(result => {
assert.strictEqual(expectedPem, result);
})
.catch(e => {
.catch(() => {
assert.fail('Error getting pem from promise.');
});
});
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"lib": ["es2018", "dom"],
"rootDir": ".",
"outDir": "build"
},
Expand Down

0 comments on commit f910f07

Please sign in to comment.