You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(fix): set rootDir to './src', not './'. deprecate moveTypes (#504)
* (fix/refactor): rewrite some overbroad try/catches
- so there's less silent failures that occur but don't error
- replace overbroad try/catch in getProjectPath with just an
fs.pathExists
- replace overbroad try/catch in cleanDistFolder with just an fs.remove
- fs.remove is like rimraf and `rm -rf` in that it won't error if the
file/dir doesn't exist
- if it does error, it's probably because it *failed* to remove the
dir, and that should error, because it's potentially a problem,
especially if you're publishing right after
- rewrite moveTypes() so it doesn't have an overbroad try/catch
- use fs.pathExists first and early return if it doesn't exist
- only check for known errors with fs.copy, and rethrow others
- this way if copy or remove actually fail, they will actually error
- before they would silently fail, which could similarly be pretty
bad if one were to publish right after a silent failure
* (fix): set rootDir to './src', not './'. deprecate moveTypes
- rootDir needed to be changed to ./src because the previous ./ caused
type declarations to be generated in dist/src/ instead of just dist/
- the moveTypes function handled moving the declarations back into
dist/, but occassionally had errors moving .d.ts files
- particularly in CI and for projects with many of them
- declarationMap (*.d.ts.map) files would also have issues due to
the hackiness of moveTypes, setting to rootDir to './src' is one
of the necessary steps in fixing them
- deprecate moveTypes and add a warning with instructions if it is used
when a rootDir of './' is detected
- add notes about a deprecation window in the comments
* (empty/removeme): test CI again 1
* (empty/removeme): test CI again 2
* (empty/removeme): test CI again 3
* (empty/removeme): test CI again 4
* (empty/removeme): test CI again 5
* (empty/removeme): test CI again 6
* (empty/removeme): test CI again 7
* (empty/removeme): test CI again 8
* (empty/removeme): test CI again 9
* (empty/removeme): test CI again 10
* (empty/removeme): test CI again 11
* (empty/removeme): test CI again 12
* (empty/removeme): test CI again 13
* (empty/removeme): test CI again 14
* (empty/removeme): test CI again 15
* (empty/removeme): test CI again 16
* (empty/removeme): test CI again 17
* (empty/removeme): test CI again 18
* (empty/removeme): test CI again 19
* (empty/removeme): test CI again 20
* (empty/removeme): test CI again 21
* (empty/removeme): test CI again 22
* (empty/removeme): test CI again 23
* (empty/removeme): test CI again 24
* (empty/removeme): test CI again 25
* (empty/removeme): test CI again 26
* (empty/removeme): test CI again 27
* (empty/removeme): test CI again 28
* (empty/removeme): test CI again 29
* (empty/removeme): test CI again 30
* (empty/removeme): test CI again 31
* (empty/removeme): test CI again 32
* (empty/removeme): test CI again 33
* more descriptive warning about bugs, fixup with (fix): set rootDir to './src', not './'. deprecate moveTypes
* (empty/removeme): test CI again 34
* (empty/removeme): test CI again 35
* (empty/removeme): test CI again 36
* (empty/removeme): test CI again 37
* (empty/removeme): test CI again 38
* add a comment that the catch is the problem, fixup with (fix): set rootDir to './src', not './'. deprecate moveTypes
0 commit comments