Skip to content

Releases: fp-tx/build-tools

v0.9.1

17 Sep 16:09
Compare
Choose a tag to compare

What's Changed

Summary

This may be a breaking change, since before some things would work when they really shouldn't have. And since this is for build-tooling and contains the more correct representation I am considering this a patch fix.

To avoid a breaking change set dtsOverrides to { noEmitOnError: false } which will disable type checking completely (not recommended).

In conclusion, this patch change will now properly type-check and bubble type errors to the DTS/MTS/CTS step of tsup.

Patch Changes

Full Changelog: v0.9.0...v0.9.1

v0.9.0

11 Sep 20:43
Compare
Choose a tag to compare

Summary

build-tools now has a bin configuration parameter for passing through a TypeScript "bin" file / executable that will be remapped to the corresponding JS file in the emitted package.json.

What's Changed

Full Changelog: v0.8.1...v0.9.0

v0.8.1

06 Sep 17:04
Compare
Choose a tag to compare

What's Changed

Patch Changes

Full Changelog: v0.8.0...v0.8.1

v0.8.0

05 Sep 18:30
Compare
Choose a tag to compare

Summary

Breaking Changes

  • For single entrypoint build, i.e. buildMode.type = "Single" is no longer relative to srcDir, it is relative to rootDir. So if you previously had an entrypoint of ./src/index.ts with a parameter of index.ts that must now be updated to ./src/index.ts.

Patch Changes

  • Build emissions (for multi-entrypoint builds) weren't respected for src-only entrypoints. Previously they would be emitted to ./dist while the types were emitted to ./dist/src which would cause a "no-types" error for node-10. Now, they will be properly emitted to ./dist/src or in other words, preserved.

Support for Node 10

Here are a few things to note:

  • If you are a single-entrypoint library, you will have node-10 support out of the box,
  • if you are a multi-entrypoint library you can augment node-10 support by moving your entrypoints into the root directory and updating the buildMode.entrypointGlobs parameter to reflect this.
  • If you follow the above instructions you will avoid a breaking change for your library and augment node-10 support.

What's Changed

Full Changelog: v0.7.1...v0.8.0

v0.7.1

04 Sep 18:54
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • @fp-tx/build-tools now properly respects your tsconfig, and this means that configurations that worked before may not work any more. I have attempted to improve the errors of some of the issues I ran into, but if you run into an undocumented error, please create an issue for it along with possible resolutions.

Patch Changes

  • Improved error messages during type generation
  • build-tools will now merge plugin declarations from build-tools and additional plugins specified in the extraConfig parameter

Full Changelog: v0.7.0...v0.7.1

v0.6.0

21 Aug 18:20
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • feat(dts): strip internal by default, add dts compiler overrides option by @jacob-alford in #11

Summary

  • Now TypeScript will strip anything marked with the @internal jsdoc tag. See the relevant documentation.
  • There is now an available config option to override compiler options. Do not use this option unless you know what you are doing.

Note to library authors

If you use the @internal JSDoc tag, this will likely result in a breaking change for your library as those types will no longer be included in the final output.

If you wish to continue including those internal types as to avoid a breaking change, pass the following to the configuration which will override the new default option.

{
  dtsCompilerOverrides: {
    stripInternal: false
  }
}

A word of caution

If one of your exports depends on something that is marked with an @internal tag, this will result in an error during type compilation. This should be caught during lib-check, so do not disable that option.

Full Changelog: v0.5.0...v0.6.0

0.5.0

20 Aug 22:30
Compare
Choose a tag to compare

What's Changed

@fp-tx/build-tools will now emit .d.ts and .d.mts or .d.cts files respecting their structure relative to config#srcDir and config#basePath.

Note for library authors

This will not produce a breaking change for your libraries, however you may need to make a change to your package.json exports depending on how you publish your library.

  • If you publish from ./dist there is nothing you need to do.
  • If you publish from . you must first update your type imports to account for the new structure. Essentially, if your source directory is src you need only add ./dist_/src_/foo.d.ts to the type exports.

For any issues that arise, please feel free to make an issue for it.

Breaking Changes

  • feat(workspaces): preserve d.(c|m)ts directory structure by @jacob-alford in #10

Full Changelog: v0.4.1...v0.5.0

0.4.1

08 Aug 22:35
Compare
Choose a tag to compare

What's Changed

Patch Changes

Full Changelog: v0.4.0...v0.4.1

v0.4.0

07 Mar 09:40
Compare
Choose a tag to compare

Patch Changes

  • Fix: support index modules by @skeate in #5

Breaking Changes

  • Fix: iife exports, and import/export extension remapping by @jacob-alford in #8

Details

Pacakge type: module

  • iife / global exports now emitted as .cjs when emitting cjs, esm, and dual
  • cjs now properly emits .d.cts

Package type: commonjs

  • esm now properly emits .d.mts

Types

  • Imports now respect module emissions
  • Import remapping now respects index exports (thanks @skeate!)

E2E tests

  • build-tools is now covered by e2e tests (thanks @skeate!)

Full Changelog: v0.3.1...v0.4.0

0.3.1

13 Feb 23:58
Compare
Choose a tag to compare

Patch changes

Full Changelog: v0.3.0...v0.3.1