Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

feat(infrastructure): add tsconfig, tslint, and build setup #4241

Merged
merged 34 commits into from
Jan 18, 2019

Conversation

moog16
Copy link
Contributor

@moog16 moog16 commented Jan 10, 2019

Refs #4225

  • added a tsconfig and tslint
  • added ts-loader to webpack to get npm start/dev/build to work
  • removed babylon from package.json and upgraded to @babel/parser
    • babylon is deprecated
  • renamed rewrite-declaration-statements-for-closure.js -> rewrite-declaration-statements-for-typescript.js
    • no longer editting export statements
    • imports are not relative to the .typescript-tmp/packages directory (as per internal google requirements)
  • renamed closure-rewrite.js -> typescript-rewrite.js

Tested this by running:

npm run lint
npm run start # hit a few pages to see if there were errros
npm run clean
npm run dist
node scripts/cp-pkgs.js
npm run dev # still needs to run (i assumed)
npm test

TODO: need to update webpack to build ES6 and ES5 dist files

@moog16 moog16 changed the base branch from master to feat/typescript January 10, 2019 02:05
@codecov-io
Copy link

codecov-io commented Jan 10, 2019

Codecov Report

❗ No coverage uploaded for pull request base (feat/typescript@e718cb2). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                 @@
##             feat/typescript    #4241   +/-   ##
==================================================
  Coverage                   ?   98.47%           
==================================================
  Files                      ?       92           
  Lines                      ?     5624           
  Branches                   ?      758           
==================================================
  Hits                       ?     5538           
  Misses                     ?       86           
  Partials                   ?        0
Impacted Files Coverage Δ
packages/mdc-base/foundation.ts 100% <100%> (ø)
packages/mdc-base/component.ts 96.55% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e718cb2...c8cd149. Read the comment docs.

@mdc-web-bot
Copy link
Collaborator

🤖 Beep boop!

Screenshot test report 🚦

4 screenshots changed from master on commit a2bb0e1:

Details

@moog16 moog16 force-pushed the feat/tsconfig-webpack-setup branch from 6aa3286 to 2a9da2e Compare January 10, 2019 19:00
Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue I'm noticing is that unit tests no longer show coverage at all for the converted mdc-base package, so it seems like we might've lost instrumentation? Maybe we need to update something in karma.conf.js?

@moog16
Copy link
Contributor Author

moog16 commented Jan 15, 2019

@kfranqueiro figured out the istanbul loader...depressing to see that getting this into the react repo took almost 3 days of experimentation, and it was just a few line changes...

@abhiomkar abhiomkar self-assigned this Jan 15, 2019
@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 46a7c1f vs. feat/typescript! 💯🎉

Matt Goo added 2 commits January 15, 2019 10:27
…ponents/material-components-web into feat/tsconfig-webpack-setupt push
@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit af44094 vs. feat/typescript! 💯🎉

@moog16 moog16 force-pushed the feat/tsconfig-webpack-setup branch from a0d3422 to 46237c8 Compare January 15, 2019 22:36
@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 2578a7e vs. feat/typescript! 💯🎉

Matt Goo and others added 3 commits January 16, 2019 15:23
@kfranqueiro kfranqueiro dismissed abhiomkar’s stale review January 16, 2019 23:37

These review comments have been resolved, and Abhinay's OOO today

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 5fd5092 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 8585d61 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 4f84473 vs. feat/typescript! 💯🎉

@kfranqueiro
Copy link
Contributor

Matt is currently investigating an issue causing incorrect branch/function coverage reporting. (It's reporting uncovered branches that don't exist.) This is why unit tests are failing (the unit tests pass but coverage falls below threshold).

@moog16
Copy link
Contributor Author

moog16 commented Jan 18, 2019

Figured out the incorrect branch/function coverage reporting. The side effect is that istanbul package no longer works. This package only reported to the CLI, so it is non-essential.

I moved the statements/branches/functions/lines test into the karma.config.js, which fails if the tests limits are not met.

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 01c6044 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit bafff07 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit 8f7b603 vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit afae2ea vs. feat/typescript! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 758 screenshot tests passed for commit c8cd149 vs. feat/typescript! 💯🎉

@moog16 moog16 merged commit 448918d into feat/typescript Jan 18, 2019
@moog16 moog16 deleted the feat/tsconfig-webpack-setup branch January 18, 2019 20:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants