-
Notifications
You must be signed in to change notification settings - Fork 225
Conversation
f906ee4
to
8429568
Compare
05fa209
to
8437ba2
Compare
df054dd
to
11207eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions and comments, mostly I want the extraneous files burned and the ts-ignore
s gone, but we should also at the least create tasks for making sure the new boilerplate doesn't get out of synch in the future.
{"path": "./semaphore"}, | ||
{"path": "./sewing-kit-koa"}, | ||
{"path": "./useful-types"}, | ||
{"path": "./with-env"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sucks that we have to manually maintain a list like this. It doesn't have to be part of this PR but at the least we should add a task to include adding an entry here in the new package generator, or at least have a separate script that gets run after like we do with adding to the main readme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test to cover for now.
"./src/**/*.tsx" | ||
], | ||
"exclude": ["**/*.test.ts", "**/*.test.tsx"], | ||
"references": [{"path": "../react-html"}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have issues with remembering to add dependencies to package.json
when they are local packages. We are going to want to have some way of statically enforcing that dependencies are tracked in the tsconfig properly, whether through a linter, a custom script, a repo-level test, or whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler does an ok-ish good job at checking this. If a project is missing an explicit reference here then the build fails. That said, I've seen cases of it passing without an explicit reference. I'll open up an issue.
packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx
Outdated
Show resolved
Hide resolved
@@ -7,7 +7,7 @@ export class MockLink extends ApolloLink { | |||
super(); | |||
} | |||
|
|||
request(operation: Operation) { | |||
request(operation: Operation): Observable<any> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is any
right here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent a bit of time trying to address these. The changes were significant in some cases. I'd prefer having those changes in a subsequent PR if that's ok with you. I can open up an issue for now
package.json
Outdated
"test": "NODE_ICU_DATA=node_modules/full-icu jest --maxWorkers=3 --coverage=false", | ||
"check": "lerna run check", | ||
"release": "lerna publish", | ||
"clean": "rimraf './packages/*/dist/**/*.{js,d.ts}'", | ||
"clean": "rimraf './packages/*/dist/**/*.{js,d.ts}' './packages/*/*.tsbuildinfo' './packages/*.tsbuildinfo'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know dist/src
is annoying, but it's unavoidable for most projects. So I'd prefer standardising on that, even for projects that currently use dist
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More importantly, how are you planning to have tsbuildinfo
files cached in CI? I'm still at the top of the PR, so I may be missing the magic that makes it happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'd prefer standardising on that, even for projects that currently use dist
I've updated all the monorepo tsconfigs to reflect this as sewing-kit does. ('.'
as the baseUrl
and rootDir
). Also changed the number of imports from ./dist/foo
to ./dist/src/foo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how are you planning to have tsbuildinfo files cached in CI?
I tried getting Travis to only cache the tsbuildinfo
files, but I couldn't find any docs or working examples of caching files. Only directories. How does sewing-kit cache tsbuildinfo
files?
In Travis, what if we move all the tsbuildinfo
s to a tmp_build_cache
directory of some sort after a build and dump them back into their respective packages/*
paths before a subsequent build starts.
packages/useful-types/tsconfig.json
Outdated
@@ -0,0 +1,15 @@ | |||
{ | |||
"extends": "../tsconfig_base.json", | |||
"compileOnSave": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compileOnSave
should be in the base config, and deleted from all others.
packages/useful-types/tsconfig.json
Outdated
"rootDir": "./src" | ||
}, | ||
"include": [ | ||
"../../config/typescript/**/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this pulling in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like anything. I wrote a script that converted all tsconfig.build.json
=> tsconfig.json
and updated the extended field. Looking at the history of this file this must have been included from the generators.
packages/useful-types/tsconfig.json
Outdated
"include": [ | ||
"../../config/typescript/**/*", | ||
"./src/**/*.ts", | ||
"./src/**/*.tsx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need to process tsx files?
packages/useful-types/tsconfig.json
Outdated
"./src/**/*.ts", | ||
"./src/**/*.tsx" | ||
], | ||
"exclude": ["**/*.test.ts", "**/*.test.tsx"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no test files, so 🔥
packages/with-env/tsconfig.json
Outdated
"rootDir": "./src" | ||
}, | ||
"include": [ | ||
"../../config/typescript/**/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question about pulling in config
and tsx files as above.
packages/tsconfig_base.json
Outdated
}, | ||
"include": ["./**/*.ts", "./**/*.tsx"], | ||
"exclude": ["./node_modules"] | ||
"include": ["../config/typescript/**/*.d.ts"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have an include here? I thought all projects should specify their own includes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed
Thanks for all the feedback folks. I'll get back around to addressing these comments sometime this week. Metrics tracking works is higher on my list of but I'll be been pushing this in-between cycles. |
d1c8ac9
to
5ec4a47
Compare
Description
Closes #857
This PR adds Typescript Project References to quilt. In doing so we aim to see faster CI builds and faster local rebuilds.
Faster CI builds
Faster local rebuilds