Skip to content

Releases: jaredpalmer/tsdx

v0.12.0

19 Dec 15:05

Choose a tag to compare

Improvements

  • Added Storybook template
  • Upgraded to Ts 3.7.x
  • Updated rollup deps / plugins
  • Moved the cache root to be inside of node_modules, you can delete the .rts2_cache_xxx folders from root and remove them from your .gitignore files
  • (internals) Made internal methods async where possible, should result in a minor speed boost.
  • Added optional chaining and nullish coalescing operators support
  • When running in an interactive shell (i.e. if process.env.CI false), tsdx test now runs Jest in watch mode. Note: Most CI services set CI env variable to true by default. Our implementation is exactly how create-react-app does it.
  • tsdx test will pass in cases where no tests exist
  • Added "prepare" task to package.json scripts so that you can publish immediately. For those interested, I like to publish (TSDX) packages with np to do this.

Bugfixes

  • Fix error when providing babel/preset-env without options
  • Got rid of eslint warning upon install
  • (Internal) Tests now run on PRs
  • Do not output warning about react on non-react projects

Roadmap

  • Add Closure Compiler
  • Better support for "preshaking" and top level exports
  • Monorepo support. Note: Formik is now using lerna and TSDX, so we'll be using it as a playground

Commits

  • (deps/lint): upgrade @typescript-eslint to support ?. and ?? (#377) 843c676
  • (ci): add a lint job so PRs will require passing lint (#378) 930feb9
  • (clean): remove .rts_cache_* from storybook gitignore (#375) c5df5ac
  • Add optional chaining and nullish coalescing operators support (#370) a736c77
  • Added Storybook template (#318) c487377
  • Merge pull request #373 from agilgur5/fix-pr-ci 7c8481b
  • (fix/ci): GitHub Actions should run on PRs as well 5da9f65
  • Merge pull request #372 from agilgur5/fix-format b8f24e2
  • (fix/format): formatting of #366 didn't pass lint f3399e0
  • Add prepare script to generated project (#334) ef93d1d
  • default jest to watch mode when not in CI (#366) 5ee9dfc
  • (fix): respect tsconfig esModuleInterop flag (#327) e8be03c
  • Merge pull request #368 from jamesgeorge007/hotfix/typo-fix 78cccfe
  • fix: minor typo aa8ab42
  • update rollup deps and plugins (#364) d621994
  • update rollup deps and plugins eb35feb
  • update to ts 3.7 (#363) cab5591
  • update to ts 3.7 5e84911
  • Remove unnecessary yarn install command in GH action (#361) c44bd41
  • Remove unnecessary yarn install command in GH action 3148138
  • Replaced some sync methods for their async version (#291) c5f65bc
  • Merge pull request #360 from goznauk/master 5aa5eda
  • update README.md dfdd364
  • update README.md 085916c
  • Use node_modules/.cache/... as cacheRoot (#329) 55c0d47
  • fix(lint): Only default to src test if they exist (#344) 3261dea
  • Fix error when providing babel/preset-env without options (#350) a1a0dcb
  • Replaced some sync methods for their async version 4deb7e2
  • fix(lint): do not output warning about react on non-react projec… (#308) 6252b70
  • chore(lint): use detect setting for eslint-plugin-react in react projects b6c3153
  • fix(eslint): do not output warning about react on non-react projects 830e413
  • Merge pull request #303 from jaredpalmer/greenkeeper/rollup-plugin-typescript2-0.25.2 ffd8733
  • chore(package): update lockfile yarn.lock ed6f490
  • fix(package): update rollup-plugin-typescript2 to version 0.25.2 62f0241
  • feat(utils): add util that gets the React version of a project, if exists cf6718c
  • Tweak docs f1a2643
  • Update execa to the latest version 🚀 (#266) 6225b8e
  • Merge branch 'master' into greenkeeper/execa-3.2.0 c9f04c3
  • Merge pull request #195 from sadsa/patch-1 acd7e54
  • Update eslint-plugin-react-hooks to the latest version 🚀 (#281) 72154fa
  • chore(package): update lockfile yarn.lock 1186b7d
  • fix(package): update eslint-plugin-react-hooks to version 2.2.0 28f16c2
  • chore(package): update lockfile yarn.lock 1cd2fb3
  • fix(package): update execa to version 3.2.0 d6b5ef3
  • Pass tests in cases where no tests exist 61a3177

v0.11.0...v0.12.0

v0.11.0

29 Oct 14:01

Choose a tag to compare

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.5...v0.11.0

v0.10.3

16 Oct 22:41

Choose a tag to compare

Commits

v0.10.2...v0.10.3

v0.10.2

16 Oct 21:34

Choose a tag to compare

Improvements

  • tsdx create will now default to an MIT license
  • tsdx create will try to pull author info for package.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...v0.10.2

v0.10.1

16 Oct 21:26

Choose a tag to compare

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

v0.10.0...v0.10.1

v0.10.0

15 Oct 14:07

Choose a tag to compare

Improvements

  • Support for async/await in rollup plugins
  • Added system to format options
  • Added support for jest.config.js (it will merge with the defaults)
  • TSDX will now clean the dist directory on tsdx 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...v0.10.0

v0.9.3

30 Sep 13:31

Choose a tag to compare

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...v0.9.3

v0.9.2

09 Sep 18:20

Choose a tag to compare

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

v0.9.1...v0.9.2

v0.9.1

03 Sep 14:53

Choose a tag to compare

Bugfix

  • Fixed regression where lodash imports were being rewritten in CommonJS builds.
  • Fixed lint command

Commits

  • Don't replace imports in cjs build (#192) 790e781
  • Fix lint command usage by husky and required files (#189) 8197e0f
  • Add local react fix to gitignore c6d2ef3

v0.9.0...v0.9.1

v0.9.0

27 Aug 19:35

Choose a tag to compare

Improvements

  • --extractErrors has been changed to a boolean. It will just default to use a dummy URL in the ErrorProd.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 called tsdx.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...v0.9.0