Skip to content

Releases: google/gts

gts v2.0.0

10 Apr 02:01
326fc15

Choose a tag to compare

⚠ BREAKING CHANGES ⚠

This is a major rewrite of the tool. Based on community guidance, we've switched from using tslint to eslint. Please read all of the steps below to upgrade.

Configuring eslint

With the shift to eslint, gts now will format and lint JavaScript as well as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run:

$ npx gts fix

To specify only TypeScript:

$ npx gts fix '**/*.ts'

Delete tslint.json

This file is no longer used, and can lead to confusion.

Create a .eslintrc.json

Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named .eslintrc.json, and paste the following:

{
  "extends": "./node_modules/gts"
}

Create a .eslintignore

The .eslintignore file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's really important to ignore your build directory! Here is an example of a .eslintignore file:

**/node_modules
build/

Create a .prettierrc.js

The formatting rules in gts need to be extended. Create a file named .prettierrc.js, and add the following:

module.exports = {
  ...require('gts/.prettierrc.json')
}

Rule changes

The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out .eslintrc.json.

Require Node.js 10.x and up

Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up.

Features

Bug Fixes

gts v1.1.2

20 Nov 23:18

Choose a tag to compare

Bug Fixes

  • deps: update to newest prettier (with support for optional chain) (#396) (ce8ad06)

gts v1.1.1

18 Nov 01:14

Choose a tag to compare

Bug Fixes

  • deps: update dependency chalk to v3 (#389) (1ce0f45)
  • deps: update dependency inquirer to v7 (#377) (bf2c349)
  • deps: update dependency rimraf to v3 (#374) (2058eaa)
  • deps: update dependency write-file-atomic to v3 (#353) (59e6aa8)

v1.1.0

30 Jul 21:36
cf01512

Choose a tag to compare

Bug Fixes

  • avoid conflicts between prettier and tslint (#348) (83cb107)
  • npx command on Windows and make sure build/test work on Windows too (#306) (458be26), closes #2
  • process less files in parallel preventing OOM errors (#369) (b48196d)
  • deps: update dependency update-notifier to v3 (#339) (a6f9cfa)

Features

v1.0.0

25 Apr 18:17
1dffa53

Choose a tag to compare

This release contains breaking changes. Picking up this update most likely will cause a breaking change in your module. Take care when picking up this update.

Breaking Changes

  • We have switched to prettier as the code formatting tool (#259). gts run fix should migrate your code over to the new style 💅.
  • This release drops support for Node 6 which will reach end-of-life in April 2019 (#256) 💀.
  • This release defaults to ES2017 as the TypeScript code generation target. This means that the generated code needs a minimum of Node 8 to run. On the plus side this means that generated code would use native implementation of ES2017 features (e.g. async/await) rather than using poly-fills 🧬. This change is most likely a breaking change for your module. You can override this setting by customizing your tsconfig.json however.
  • The tslint configuration has been updated to pick up changes in the Google style guide🧐.
  • Assumes that target projects are using TypeScript 3.x+ 🎯.

Other features

  • Support for yarn (#285)

1.0.0-0 Release Candidate

26 Feb 13:55
d4e7f54

Choose a tag to compare

Pre-release

This is a release candidate working towards the 1.0.0 release.

This release contains breaking changes. Picking up this update most likely will cause a breaking change in your module. Take care when picking up this update.

Breaking Changes

  • We have switched to prettier as the code formatting tool (#259). gts run fix should migrate your code over to the new style 💅.
  • This release drops support for Node 6 which will reach end-of-life in April 2019 (#256) 💀.
  • This release defaults to ES2017 as the TypeScript code generation target. This means that the generated code needs a minimum of Node 8 to run. On the plus side this means that generated code would use native implementation of ES2017 features (e.g. async/await) rather than using poly-fills 🧬. This change is most likely a breaking change for your module. You can override this setting by customizing your tsconfig.json however.
  • The tslint configuration has been updated to pick up changes in the Google style guide🧐.
  • Assumes that target projects are using TypeScript 3.x+ 🎯.

Commits

v0.9.0

13 Nov 00:20

Choose a tag to compare

Notable Changes

  • 66da7ec fix: upgrade init'ed and allowed versions of TypeScript (#208)
  • f7c75ee feat: print clang-format output (#186)

Commits

  • 399f851 (HEAD -> master, origin/master) chore(deps): lock file maintenance (#222)
  • fd89106 chore(deps): lock file maintenance (#221)
  • 9b00263 chore(deps): lock file maintenance (#219)
  • aced615 chore(deps): lock file maintenance (#218)
  • 3eaed5e chore(deps): update dependency @types/meow to v5 (#217)
  • 42ce864 chore(deps): lock file maintenance (#216)
  • 6d602ab chore(deps): update dependency typescript to ~3.1.0 (#213)
  • 6ae3d7f chore(deps): lock file maintenance (#209)
  • 66da7ec fix: upgrade init'ed and allowed versions of TypeScript (#208)
  • 77e7d6c (fix-203) chore(deps): update dependency @types/glob to v7 (#206)
  • 4d1dff9 chore(deps): lock file maintenance (#204)
  • 1ac64ac chore(deps): update dependency nyc to v13 (#205)
  • 6964b4c chore(deps): lock file maintenance (#202)
  • d44c58a chore(deps): update dependency @types/inquirer to ^0.0.43 (#200)
  • a83308d chore(deps): update dependency typescript to v3 (#192)
  • 57cd5ee chore(deps): lock file maintenance (#198)
  • 9e8e406 chore(deps): lock file maintenance (#197)
  • 0989560 fix(deps): update dependency pify to v4 (#196)
  • dea8269 chore(deps): lock file maintenance (#195)
  • 29514c0 chore(deps): lock file maintenance (#193)
  • 6eca165 chore(deps): lock file maintenance (#191)
  • a8d8da6 chore(deps): update dependency typescript to ~2.9.0 (#190)
  • d0d430d fix: allow 'gts clean' to follow tsconfig.json dependency chain (#185)
  • f7c75ee feat: print clang-format output (#186)
  • e107ab3 chore: Configure Renovate (#189)

No esModuleInterop and allowSyntheticDefaultImports

12 Jul 21:01
82ecc4e

Choose a tag to compare

This is a release with breaking changes. We no longer set the esModuleInterop and allowSyntheticDefaultImports in the default TypeScript config. These might be reasonable configurations for end-user application code, but for libraries these can be problematic. TypeScript users of such libraries must have these flags set as well for compilation to succeed. For example: googleapis/google-auth-library-nodejs#381.

There are two ways to deal with this breaking change:

  • (recommended) change code using synthetic imports (import fs from 'fs') back to using old style imports (import * as fs from 'fs').
  • Add "esModuleInterop": true to your local tsconfig.json.

Sorry for the churn.

Commits

v0.7.1

19 Jun 00:07
4f09fc3

Choose a tag to compare

This release fixes a regression with code formatting introduced in v0.7.0.

Commits

  • 074a377 fix(format): deal with absent .clang-format (#176)

0.7.0

18 Jun 20:32

Choose a tag to compare

This release adds support for generating .clang-format and tslint.json in the target directory. The default implementations extend the gts configurations. If these files are not present we still fall back to the default gts provided config files.

This should enable editors to pickup the format and lint settings.

Commits