Skip to content

Commit 81c24ec

Browse files
authored
build!: update to latest gts and TypeScript (#271)
1 parent 062f10a commit 81c24ec

14 files changed

+126
-90
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts"
3+
}

.eslintrc.yml

-15
This file was deleted.

.prettierignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
node_modules/*
2-
samples/node_modules/*
3-
src/**/doc/*
1+
**/node_modules
2+
**/.coverage
3+
build/
4+
docs/
5+
protos/

.prettierrc

-8
This file was deleted.

.prettierrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
module.exports = {
16+
...require('gts/.prettierrc.json')
17+
}

package.json

+6-10
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
],
2424
"scripts": {
2525
"prepare": "npm run compile && node ./build/tools/prepublish.js",
26-
"lint": "gts check && eslint '**/*.js'",
26+
"lint": "gts check",
2727
"test": "c8 mocha build/test",
28-
"fix": "gts fix && eslint --fix '**/*.js'",
28+
"fix": "gts fix",
2929
"system-test": "echo no system tests 😱",
3030
"samples-test": "cd samples && npm link ../ && npm test && cd ../",
3131
"docs": "compodoc src/",
@@ -48,18 +48,14 @@
4848
"@types/sinon": "^5.0.7",
4949
"codecov": "^3.0.0",
5050
"decompress-zip": "^0.3.2",
51-
"eslint": "^6.0.0",
52-
"eslint-config-prettier": "^6.0.0",
53-
"eslint-plugin-node": "^11.0.0",
54-
"eslint-plugin-prettier": "^3.0.0",
5551
"got": "^8.0.3",
56-
"gts": "^1.0.0",
52+
"gts": "next",
5753
"linkinator": "^2.0.0",
58-
"mocha": "^7.0.0",
59-
"c8": "^7.0.0",
54+
"mocha": "^7.1.1",
55+
"c8": "^7.1.0",
6056
"prettier": "^1.10.2",
6157
"proxyquire": "^2.0.0",
6258
"sinon": "^9.0.0",
63-
"typescript": "3.6.4"
59+
"typescript": "^3.8.3"
6460
}
6561
}

samples/test/test.js

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
/*!
2-
* Copyright 2018 Google LCC. All Rights Reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1614

1715
'use strict';
1816

src/index.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714

815
import * as path from 'path';
916
import * as loader from './load';

src/load.ts

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714

815
import * as path from 'path';
916
import * as protobuf from 'protobufjs';
@@ -12,7 +19,7 @@ import * as walk from 'walkdir';
1219
let COMMON_PROTO_FILES: string[];
1320

1421
export interface GoogleProtoFilesRootOptions {
15-
// tslint:disable-next-line no-any
22+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1623
[index: string]: any;
1724
}
1825

test/index.test.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714

815
import * as assert from 'assert';
916
import {describe, it} from 'mocha';

test/load.test.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714

815
import * as assert from 'assert';
916
import {describe, it} from 'mocha';

test/prepublish.test.ts

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714

815
import * as assert from 'assert';
9-
import {describe, it} from 'mocha';
16+
import {before, describe, it} from 'mocha';
1017
import * as pq from 'proxyquire';
1118
import * as sinon from 'sinon';
1219

tools/prepublish.ts

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
/**
2-
* Copyright 2018 Google LLC
3-
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
6-
*/
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
714
import {promisify} from 'util';
815
import * as fs from 'fs';
916
import * as got from 'got';
1017
import * as path from 'path';
1118

12-
// tslint:disable-next-line variable-name
19+
// eslint-disable-next-line @typescript-eslint/no-var-requires
1320
const DecompressZip = require('decompress-zip');
1421

1522
const extract = (input, opts, callback) => {

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "./node_modules/gts/tsconfig-google.json",
33
"compilerOptions": {
4+
"lib": ["es2018", "dom"],
45
"rootDir": ".",
56
"outDir": "build",
67
"noImplicitAny": false

0 commit comments

Comments
 (0)