Skip to content

Commit

Permalink
Upgrade Typescript and improve build scripts (#704)
Browse files Browse the repository at this point in the history
- Upgrade TypeScript to version 3.9.6. This gives access to null
  coalescing operator

- Remove the custom prettier check script and just `prettier --check`

- Run `yarn install` as part of `yarn bootstrap`. This ensures that
  `yarn start` and `yarn test` will never try to run with outdated
  dependencies (which can cause the build or tests to fail).
  • Loading branch information
lavelle authored Jul 16, 2020
1 parent 6893900 commit c0e31da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"start": "echo \"\n👋 New to Thumbprint? Take a look at our 'CONTRIBUTING.md' for tips!\n\" && yarn run bootstrap && echo \"\nℹ️ Need a hand? Reach out on #design-systems for help.\n\" && yarn workspace www start",
"start:ssr": "yarn run build:docs && yarn workspace www serve",
"updated": "lerna updated",
"bootstrap": "lerna run prepublishOnly",
"bootstrap": "yarn install && lerna run prepublishOnly",
"publish": "git checkout master && git pull && yarn && yarn test && yarn build:dist && lerna publish",
"build:docs": "yarn run bootstrap && yarn workspace www build",
"build:dist": "lerna exec -- rm -rf dist .cache && yarn run bootstrap",
"format": "prettier \"**/*.{ts,tsx,js,jsx,css,scss,json,md,mdx,html}\" --write",
"test": "yarn run bootstrap && yarn run test:lint && yarn run test:jest && yarn run test:prettier && yarn test:typecheck",
"test:jest": "TZ=America/Los_Angeles jest",
"test:jest:watch": "yarn run bootstrap && yarn test:jest --watch",
"test:prettier": "./scripts/test-prettier.sh",
"test:prettier": "prettier \"**/*.{ts,tsx,js,jsx,css,scss,json,md,mdx,html}\" --check",
"test:lint": "yarn test:lint:css && yarn test:lint:js",
"test:lint:css": "stylelint \"**/*.scss\" \"**/*.css\" --ignore-path .gitignore",
"test:lint:js": "eslint . --ignore-path .gitignore --ext .jsx,.js,.tsx,.ts",
Expand Down Expand Up @@ -74,7 +74,7 @@
"stylelint-config-recommended-scss": "^3.3.0",
"stylelint-scss": "^3.11.0",
"tslib": "^1.10.0",
"typescript": "3.8.3"
"typescript": "3.9.6"
},
"repository": {
"type": "git",
Expand Down
4 changes: 0 additions & 4 deletions scripts/test-prettier.sh

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21705,10 +21705,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==

typescript@3.8.3:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
typescript@3.9.6:
version "3.9.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a"
integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==

typescript@^3.9.3:
version "3.9.5"
Expand Down

0 comments on commit c0e31da

Please sign in to comment.