Skip to content

Releases: jaredpalmer/tsdx

v0.11.0

29 Oct 14:01
Compare
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
Compare
Choose a tag to compare

Commits

v0.10.2...v0.10.3

v0.10.2

16 Oct 21:34
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

v0.8.0

14 Aug 16:34
Compare
Choose a tag to compare

Improvements

  • Added experimental --extractErrors flag
  • Added ability to specify path to a custom tsconfig.json
  • Added --template flag to tsdx create So you can run npx 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

v0.7.2...v0.8.0