Releases: google/gts
gts v2.0.0
⚠ 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
- add the eol-last rule (#425) (50ebd4d)
- allow eslintrc to run over tsx files (#469) (a21db94)
- disable global rule for checking TODO comments (#459) (96aa84a)
- override require-atomic-updates (#468) (8105c93)
- prefer single quotes if possible (#475) (39a2705)
- use eslint instead of tslint (#400) (b3096fb)
Bug Fixes
- use .prettierrc.js (#437) (06efa84)
- deps: update dependency chalk to v4 (#477) (061d64e)
- deps: update dependency eslint-plugin-node to v11 (#426) (a394b7c)
- deps: update dependency execa to v4 (#427) (f42ef36)
- deps: update dependency prettier to v2 (#464) (20ef43d)
- disable no-use-before-define (#431) (dea2c22)
- deps: update dependency update-notifier to v4 (#403) (57393b7)
- deps: upgrade to meow 6.x (#423) (8f93d00)
- align back to the google style guide (#440) (8bd78c4)
- disable empty-function check (#467) (6455d7a)
- drop support for node 8 (#422) (888c686)
- emit .prettierrc.js with init (#462) (b114614)
- enable trailing comma (#470) (6518f58)
- include *.tsx and *.jsx in default fix command (#473) (0509780)
gts v1.1.2
gts v1.1.1
v1.1.0
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
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 fixshould 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.jsonhowever. - The
tslintconfiguration 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
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 fixshould 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.jsonhowever. - 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
- c91deb8 docs: update repository links, and improve the readme (#282)
- 9f31f0f doc: warn about master, released version delta (#280)
- 02e0772 fix: provide filepath to prettier (#273)
- 08c412f chore(deps): lock file maintenance (#272)
- 75fb461 fea!: a few semver major changes (#265)
- 5b5c342 chore(deps): update dependency @types/tmp to ^0.0.34 (#264)
- a4afbb6 chore(deps): lock file maintenance (#261)
- e9874d6 (origin/next, next) fix: add Code of Conduct (#262)
- 5f35e09 feat!: switch to prettier for formatting (#259)
- e33db48 feat!: change output target to es2017 (#255)
- f4c337c build: stop testing on Node 6 (#256)
- 8b12c3c chore(deps): update dependency make-dir to v2 (#258)
- 2b7f751 chore(deps): lock file maintenance (#257)
- 05bc5fd chore(deps): update dependency typescript to ~3.3.0 (#254)
- 7738ba5 fix: address post-landing comments (#251)
- 6576fc6 chore(deps): update dependency @types/diff to v4 (#250)
- 3a3a191 chore(deps): lock file maintenance (#249)
- 1c938eb fix(lint): skip lint on json files (#220)
- f88200c chore(deps): lock file maintenance (#248)
- 9f71a60 chore(deps): lock file maintenance (#246)
- 4e21924 chore(deps): lock file maintenance (#245)
- 70833db fix(deps): update dependency diff to v4 (#243)
- 66db79f chore(deps): lock file maintenance (#244)
- c5e12af chore(deps): lock file maintenance (#242)
- 1eb4ad4 chore(package): upgrade to tslint@5.12.0 (#241)
- 1ca7341 chore(build): start testing on node11 (#240)
- a77b6eb chore(deps): update dependency ava to v1 (#238)
- ce6a524 chore(deps): lock file maintenance (#239)
- 04a816f chore: use prettier for local formatting (#237)
- fa3e602 chore(deps): lock file maintenance (#236)
- 332cfcb chore(deps): lock file maintenance (#235)
- 8f81766 fix: do not allow deprecated methods (#233)
- 7c0c107 chore(deps): update dependency typescript to ~3.2.0 (#234)
- e067218 fix: Removed redundant escape characters from RegExps (#230)
- 1410b6f chore: remove gitAuthor from renovate.json (#229)
- e29fc14 fix: fixed typos (#231)
- 0ebcad2 chore(deps): lock file maintenance (#232)
- c134eda docs: README.md invisible fixes (#228)
- aac7f26 chore(deps): lock file maintenance (#226)
- bc1cc4f docs: fix link to the license file (#224)
v0.9.0
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
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": trueto your localtsconfig.json.
Sorry for the churn.
Commits
v0.7.1
0.7.0
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
- f8a8cb5 fix: do not fix format errors with --dry-run (#171)
- a34ca31 test: minor cleanup (#170)
- 9a1bfdd fix: fix with --dry-run should not modify files (#169)
- 09ca073 fix: use correct lint config for individual files (#167)
- 9689211 feat: generate .clang-format (#163)
- 2cebae4 fix: properly specify cmdline flags to meow (#166)
- 76c3097 chore(package): update nyc to version 12.0.2 (#164)
- d2c325b feat: generate tslint.json (#160)
- cef0d68 fix(package): update inquirer to version 6.0.0 (#162)
- e8cca36 feat: ability to use user provided tslint config (#159)
- 0fd3a2d test: resolve gtsRootDir in tests (#158)
- 86ffb3b chore: start testing against Node 10 (#157)