Skip to content

Releases: preconstruct/preconstruct

@preconstruct/cli@2.0.6

03 Mar 20:15
ce2c404
Compare
Choose a tag to compare

Patch Changes

  • d1feb8e #376 Thanks @Andarist! - Fixed the watch command not clearing dev links of additional entrypoints correctly and creating an infinite loop because of this.

@preconstruct/cli@2.0.5

24 Feb 23:33
aa54f62
Compare
Choose a tag to compare

Patch Changes

@preconstruct/cli@1.2.2

24 Feb 23:39
Compare
Choose a tag to compare

Patch Changes

  • 0b15e3d Thanks @mitchellhamilton! - Set preventAssignment on @rollup/plugin-replace to stop browser builds failing to build.

@preconstruct/cli@2.0.4

09 Feb 23:42
5ec2e1a
Compare
Choose a tag to compare

Patch Changes

  • 87e8713 #295 Thanks @Andarist! - Fixed destination paths of generated "local dependency" .d.ts files (for files other than src/index.ts) in TypeScript projects on Windows.

@preconstruct/cli@2.0.3

04 Feb 23:10
85f93c6
Compare
Choose a tag to compare

Patch Changes

  • a41034d #366 Thanks @Andarist! - Fixed destination paths of generated .d.ts files in TypeScript projects on Windows.

@preconstruct/cli@2.0.2

28 Jan 00:16
a23511f
Compare
Choose a tag to compare

Patch Changes

  • 1451fc4 Thanks @mitchellhamilton! - Fix UMD builds where files contain typeof window/document and process.env.NODE_ENV

  • e3b4196 #358 Thanks @mitchellhamilton! - Improvements to Babel helper generation so that @babel/runtime(and the core-js versions) is automatically used when it is a dependency even without @babel/plugin-transform-runtime including using all of the available helpers in the version of @babel/runtime that is specified as a dependency(without Preconstruct, unless you specify the version of @babel/runtime that you use in @babel/plugin-transform-runtime, Babel helpers that aren't available in the oldest version of @babel/runtime will be inlined rather than imported from @babel/runtime).

  • 1451fc4 Thanks @mitchellhamilton! - Fix UMD builds where external dependencies contain process.env.NODE_ENV

  • 93acf0c Thanks @mitchellhamilton! - Remove an unnecessary parse

  • fe57d4c Thanks @mitchellhamilton! - Improve TypeScript declaration generation performance by only creating a single program per TS project rather than one per package

@preconstruct/cli@2.0.1

03 Dec 00:36
b9e9137
Compare
Choose a tag to compare

Patch Changes

@preconstruct/cli@2.0.0

18 Nov 23:16
b94c197
Compare
Choose a tag to compare

Major Changes

  • 9ac1df4 Thanks @mitchellhamilton! - Change the way entrypoints are configured. Instead of the entrypoints option referring to the entrypoint directories, they new refer to entrypoint source files. They are resolved relative to the src directory of the package. To get the entrypoint directory from a source file, the extension is removed from the path relative to the src directory and if the last part is index, the index part is removed. For example, an entrypoint of something.js would create an entrypoint at pkg-name/something and another/index.js would create an entrypoint at pkg-name/another.

    preconstruct fix will also now automatically create the entrypoint package.jsons because it already knows where the source file is.

    For example, a package that looks like the following in @preconstruct/cli@1

    package.json

    {
      "name": "pkg",
      "main": "dist/pkg.cjs.js",
      "preconstruct": {
        "entrypoints": [".", "other"]
      }
    }

    src/index.js

    export const something = true;

    src/other.js

    export const other = true;

    other/package.json

    {
      "main": "dist/pkg.cjs.js",
      "preconstruct": {
        "source": "../src/other.js"
      }
    }

    Would need the following changes to work in @preconstruct/cli@2

    package.json

     {
       "name": "pkg",
       "main": "dist/pkg.cjs.js",
       "preconstruct": {
    -    "entrypoints": [".", "other"]
    +    "entrypoints": ["index.js", "other.js"]
       }
     }

    other/package.json

     {
       "main": "dist/pkg.cjs.js",
    -  "preconstruct": {
    -    "source": "../src/other.js"
    -  }
     }
  • 9ac1df4 Thanks @mitchellhamilton! - Change the way that process.env.NODE_ENV is replaced in the production CJS bundle to search for process.env.NODE_ENV in the AST and replace it rather than using Terser to replace it and also skip running Terser on the production CJS bundle and instead rely on Rollup's dead code elimination to improve build performance. It's extremely unlikely that this will break anything but this is being made in a major release just in case it does.

  • 9ac1df4 Thanks @mitchellhamilton! - Change default dist filename strategy to include the scope and entrypoint path. For example, with an entrypoint accessible at @scope/pkg/entrypoint, the CJS dist filename would be scope-pkg-entrypoint.cjs.js. If you'd like to use the old dist filenames, you can set "distFilenameStrategy": "unscoped-package-name" in your root Preconstruct config.

  • dd0f041 Thanks @mitchellhamilton! - Use fast-glob directly instead of globby. This shouldn't break anything but because using fast-glob directly instead of globby may have subtly different behaviour, this is being done in a major version.

Patch Changes

  • 027e44d Thanks @mitchellhamilton! - Remove the useSourceInsteadOfGeneratingTSDeclarations and useTSMorphToGenerateTSDeclarations experimental flags as the TypeScript declaration generator no longer has the issues that these experimental flags tried to solve

  • 20902dc Thanks @mitchellhamilton! - Use symlinks instead of CJS re-export files for "module" and "browser" field when using preconstruct dev.

@preconstruct/cli@1.2.1

17 Nov 22:03
636df90
Compare
Choose a tag to compare

Patch Changes

  • 620e71f #344 Thanks @mitchellhamilton! - Make preconstruct fix automatically create entrypoint package.jsons rather than asking if it should create them with the new entrypoints experimental flag

  • 620e71f #344 Thanks @mitchellhamilton! - Rename only-unscoped-package-name to unscoped-package-name in the distFilenameStrategy option(which is only enabled when the experimental newDistFilenames flag is enabled)

@preconstruct/cli@1.2.0

16 Nov 21:16
441ff0e
Compare
Choose a tag to compare

Minor Changes

  • 3c031da #343 Thanks @Andarist! - Respect package.json#browser when bundling dependencies for the UMD build.

Patch Changes

  • a198073 #340 Thanks @Andarist! - Allow to build UMD files for packages having dependencies with top-level this in ESM files. This can often happen if a dependency package is transpiled down to ES5 using TypeScript.