Releases: jaredpalmer/tsdx
Releases · jaredpalmer/tsdx
v0.11.0
Bugfixes
- Rollback to
rollup-plugin-typescript2
. TSDX now generates types properly--again. SORRY about that folks.
Improvements
- Added support for eslint report: new flag
--report-file
- Added
--noClean
option for watch
Commits
- Update to @types/react 16.9.11 (#288) 870d05a
- Remove confusing comment (#286) 3352220
- fix: rollback typescript plugin to avoid babel config conflicts (#287) 3989277
- --noClean option for watch (#282) 9c10c70
- docs: clarify effect of propertyReadSideEffects (#280) 5becff1
- Merge pull request #277 from mfolnovic/master 0a7a469
- Added documentation e9b6bbf
- Added support for eslint report: new flag --report-file ef08ab0
- Add node version to bug template e03c051
v0.10.3
v0.10.2
Improvements
tsdx create
will now default to an MIT licensetsdx create
will try to pull author info forpackage.json
from git and npm configs or fallback to a cute lil' prompt. This is to ensure that the bootstrapped package is publishable immediately.
Commits
v0.10.1
Bugfixes
- Remove TypeScript as peer-dep (this fixes
npx tsdx create
if you don't have TS installed globally) - Updated deps
- Add back support for Node 8.12+
Improvements
- Move progress estimator cache location to
node_moudles/.cache/.progress-estimator
.
Commits
- Lazily initialize progress estimator cache (#262) 7d8c0cf
- Fix logger integration (#256) fcfc3ac
- Remove TS as peer dep (#261) a59d62a
- Add back support for node 8 (#250) eb0383b
- Update execa to the latest version 🚀 (#257) a15630a
- Use dist path config (#251) e44cbde
- Merge pull request #249 from yordis/yordis/fix-cache-folder d5569ec
- Revert formatter changes ef91a9b
- Fix cache folder location cffc994
- Fix greenkeeper going cray (#247) a8640ca
- Update dependencies to enable Greenkeeper 🌴 (#246) 8e82552
v0.10.0
Improvements
- Support for async/await in rollup plugins
- Added
system
toformat
options - Added support for
jest.config.js
(it will merge with the defaults) - TSDX will now clean the
dist
directory ontsdx build
Bugfixes
- Fixed missing
eslint
deps
POSSIBLY BREAKING
- Dropped support for Node 8 because we moved to @wessberg/rollup-plugin-ts
Commits
- Merge pull request #242 from audiolion/patch-1 1a62579
- fix: failing builds 90ecbfc
- fix(testing): add support for jest.config.js (#229) 22c2416
- feat: clean dist dir on build (#240) b86f715
- docs: add skvale as a contributor (#237) dbc3d70
- docs: add JasonEtco as a contributor (#236) 543c8d0
- docs: add sw-yx as a contributor (#232) 93bb77a
- docs: add jaredpalmer as a contributor (#231) 77eda51
- Support Async/Await in Rollup Plugins (#208) bfc0590
- Add system to list of supported formats (#228) a99f216
- Add "test" to include key in template tsconfigs (#226) 157bcee
- fix(dependencies): Use yarn.lock instead of pnpm-lock.yaml (#220) 5a6f033
- Add missing dependencies required by eslint-config-react-app (#218) 29b901b
v0.9.3
Bugfixes
tsdx lint
command no longer swallows errors
Commits
- remove async; fix test (#212) afb0281
- Merge pull request #209 from skvale/fix/196-npx-lint-without-input-files 727f71c
- feat(lint): Use src test as default input files if none are specified 3d202cf
- [Deploy Playground] Fix Netlify build command (#207) 24a1fdc
- Update README.md 0111130
- [Deploy Playground] Fix Netlify build command 26ee608
v0.9.2
Bugfixes
- Fix lint command by allowing use --write-file flag
Internals
- Using TS 3.6.2 internally
- Fix race condition between build and lint tests
- The test suite now runs against Node 8, 10, 12 x macOs, ubuntu, and windows latest (yay GitHub CI!)
- Alpha website! (https://tsdx.netlify.com) (needs some design love and dark mode)
Commits
- Remove --runInBand flag 9082695
- Fix race condition btwn build and lint tests 6e77e91
- Upgrade typescript to 3.6.2 (#205) c1197d7
- WIP: Website (#180) 3445aaf
- Run tests against Node/OS version matrix (#203) 6a8a618
- Bump mixin-deep from 1.3.1 to 1.3.2 (#202) e47b7e8
- Attempt to fix lint test (#204) 69f3787
- Fix lint command by allowing use --write-file flag (#199) d3e58ef
- Update readme to reference eslint instead of tslint. (#193) e942edb
v0.9.1
v0.9.0
Improvements
--extractErrors
has been changed to a boolean. It will just default to use a dummy URL in theErrorProd.js
component.- You can now extend TSDX's rollup configuration with
tsdx.config.js
. TSDX uses Rollup under the hood. The defaults are solid for most packages (Formik uses the defaults!). However, if you do wish to alter the rollup configuration, you can do so by creating a file calledtsdx.config.js
at the root of your project like so:
// Not transpiled with TypeScript or Babel, so use plain Es6/Node.js!
module.exports = {
// This function will run for each entry/format/env combination
rollup(config, options) {
return config; // always return a config.
},
};
The options
object contains the following:
export interface TsdxOptions {
// path to file
input: string;
// Safe name (for UMD)
name: string;
// JS target
target: 'node' | 'browser';
// Module format
format: 'cjs' | 'umd' | 'esm';
// Environment
env: 'development' | 'production';
// Path to tsconfig file
tsconfig?: string;
// Is opt-in invariant error extraction active?
extractErrors?: boolean;
// Is minifying?
minify?: boolean;
// Is this the very first rollup config (and thus should one-off metadata be extracted)?
writeMeta?: boolean;
}
Example: Adding Postcss
const postcss = require('rollup-plugin-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = {
rollup(config, options) {
config.plugins.push(
postcss({
plugins: [
autoprefixer(),
cssnano({
preset: 'default',
}),
],
inject: false,
// only write out CSS for the first bundle (avoids pointless extra files):
extract: !!options.writeMeta,
})
);
return config;
},
};
Babel
You can add your own .babelrc
to the root of your project and TSDX will merge it with its own babel transforms (which are mostly for optimization).
Commits
- Merge branch 'master' of github.com:jaredpalmer/tsdx 19c2834
- Extensible Rollup configuration (#183) cb2cf7c
- Merge branch 'master' into v0.9 a1827e4
- Merge pull request #185 from honzabrecka/update-babel-plugin-transform-async-to-promises 7bf3032
- update babel-plugin-transform-async-to-promises dependency 5838fe7
- add fixture 990f115
- document error extraction warning a7b09da
- make warning and invariant docs more descriptive 2207cee
- fix minor misunderstanding in docs 0224fac
- update docs for boolean extractErrors 111926f
- Document customization bf6731f
- Add ability to extend babel and rollup 50f2d5e
- Just default to React's url for errors by default d346cc3
v0.8.0
Improvements
- Added experimental
--extractErrors
flag - Added ability to specify path to a custom
tsconfig.json
- Added
--template
flag totsdx create
So you can runnpx tsdx create --template=react
now. - Relaxed Jest's
testMatch
flag and made it overridable.. - Added
tsdx lint
command with eslint x typescript x prettier.
Bugfixes
- Gracefully exit with code 1 when build failed (breaking change)
- Ignore ESM cache
Internal Stuff
- Dropped CircleCI for GitHub CI!
Migration Guide
To take advantage of tsdx lint
, simply add a npm script to your package.json
like so.
{
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
+ "lint": "tsdx lint"
}
}
Commits
- Add comma after lint command ef5a9c2
- Update README.md c36c1a8
- Add tsdx lint command to new project pkg.json 5a319ac
- GitHub CI (#177) dd4123d
- Add tsdx lint command (#99) e2f2983
- Add some more info about extractErrors 1a2e50c
- Update readme for errors e4da38c
- Update createJestConfig.ts
testMatch
to allow for other folder… (#159) f6ecdc9 - Ignore esm cache's locally 06b9b68
- Add error code extract and transform (#138) a20429d
- Provide ability to preserve console output during watch (#158) 37d7664
- add netlify deploy instructions to react readme (#157) a382fd2
- Add template flag to create command (#163) 8247f0a
- Gracefully exit with code 1 when build failed (#160) c850b5c
- Merge pull request #164 from leonardodino/react-doctype 8455d28
- Add doctype to react template html file cfc12fe
- Merge pull request #153 from enesTufekci/custom-tsconfig-update-readme 7b00e51
- add custom tsconfig flag usage to readme eef0b31
- Merge pull request #1 from palmerhq/master 68fab9e