unbuild
unbuild copied to clipboard
chore(deps): update all non-major dependencies
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| defu | ^6.0.0 -> ^6.1.0 |
||||
| esbuild | ^0.15.1 -> ^0.15.4 |
||||
| mlly | ^0.5.11 -> ^0.5.12 |
||||
| rollup (source) | ^2.77.3 -> ^2.78.0 |
||||
| rollup-plugin-esbuild | ^4.9.1 -> ^4.9.3 |
||||
| vitest | ^0.21.1 -> ^0.22.0 |
Release Notes
unjs/defu
v6.1.0
Features
Bug Fixes
- types: constrain inferred types of
Defu(3d3ea3e)
6.0.1 (2022-08-16)
Bug Fixes
- add typing to allow for non-objects input args (#42) (1f3a701)
- merge object strings of many types (#44) (c7226f9)
v6.0.1
evanw/esbuild
v0.15.4
-
Consider TypeScript import assignments to be side-effect free (#2468)
TypeScript has a legacy import syntax for working with TypeScript namespaces that looks like this:
import { someNamespace } from './some-file' import bar = someNamespace.foo; // some-file.ts export namespace someNamespace { export let foo = 123 }Since esbuild converts TypeScript into JavaScript one file at a time, it doesn't know if
baris supposed to be a value or a type (or both, which TypeScript actually allows in this case). This is problematic because values are supposed to be kept during the conversion but types are supposed to be removed during the conversion. Currently esbuild keepsbarin the output, which is done becausesomeNamespace.foois a property access and property accesses run code that could potentially have a side effect (although there is no side effect in this case).With this release, esbuild will now consider
someNamespace.footo have no side effects. This meansbarwill now be removed when bundling and when tree shaking is enabled. Note that it will still not be removed when tree shaking is disabled. This is because in this mode, esbuild supports adding additional code to the end of the generated output that's in the same scope as the module. That code could potentially make use ofbar, so it would be incorrect to remove it. If you wantbarto be removed, you'll have to enable tree shaking (which tells esbuild that nothing else depends on the unexported top-level symbols in the generated output). -
Change the order of the banner and the
"use strict"directive (#2467)Previously the top of the file contained the following things in order:
- The hashbang comment (see below) from the source code, if present
- The
"use strict"directive from the source code, if present - The content of esbuild's
bannerAPI option, if specified
This was problematic for people that used the
bannerAPI option to insert the hashbang comment instead of using esbuild's hashbang comment preservation feature. So with this release, the order has now been changed to:- The hashbang comment (see below) from the source code, if present
- The content of esbuild's
bannerAPI option, if specified - The
"use strict"directive from the source code, if present
I'm considering this change to be a bug fix instead of a breaking change because esbuild's documentation states that the
bannerAPI option can be used to "insert an arbitrary string at the beginning of generated JavaScript files". While this isn't technically true because esbuild may still insert the original hashbang comment before the banner, it's at least more correct now because the banner will now come before the"use strict"directive.For context: JavaScript files recently allowed using a hashbang comment, which starts with
#!and which must start at the very first character of the file. It allows Unix systems to execute the file directly as a script without needing to prefix it by thenodecommand. This comment typically has the value#!/usr/bin/env node. Hashbang comments will be a part of ES2023 when it's released next year. -
Fix
exportsmaps with Yarn PnP path resolution (#2473)The Yarn PnP specification says that to resolve a package path, you first resolve it to the absolute path of a directory, and then you run node's module resolution algorithm on it. Previously esbuild followed this part of the specification. However, doing this means that
exportsinpackage.jsonis not respected because node's module resolution algorithm doesn't interpretexportsfor absolute paths. So with this release, esbuild will now use a modified algorithm that deviates from both specifications but that should hopefully behave more similar to what Yarn actually does: node's module resolution algorithm is run with the original import path but starting from the directory returned by Yarn PnP.
v0.15.3
-
Change the Yarn PnP manifest to a singleton (#2463)
Previously esbuild searched for the Yarn PnP manifest in the parent directories of each file. But with Yarn's
enableGlobalCachesetting it's possible to configure Yarn PnP's implementation to reach outside of the directory subtree containing the Yarn PnP manifest. This was causing esbuild to fail to bundle projects with theenableGlobalCachesetting enabled.To handle this case, esbuild will now only search for the Yarn PnP manifest in the current working directory of the esbuild process. If you're using esbuild's CLI, this means you will now have to
cdinto the appropriate directory first. If you're using esbuild's API, you can override esbuild's value for the current working directory with theabsWorkingDirAPI option. -
Fix Yarn PnP resolution failures due to backslashes in paths on Windows (#2462)
Previously dependencies of a Yarn PnP virtual dependency failed to resolve on Windows. This was because Windows uses
\instead of/as a path separator, and the path manipulation algorithms used for Yarn PnP expected/. This release converts\into/in Windows paths, which fixes this issue. -
Fix
sideEffectspatterns containing slashes on Windows (#2465)The
sideEffectsfield inpackage.jsonlets you specify an array of patterns to mark which files have side effects (which causes all other files to be considered to not have side effects by exclusion). That looks like this:"sideEffects": [ "**/index.js", "**/index.prod.js" ]However, the presence of the
/character in the pattern meant that the pattern failed to match Windows-style paths, which brokesideEffectson Windows in this case. This release fixes this problem by adding additional code to handle Windows-style paths.
v0.15.2
-
Fix Yarn PnP issue with packages containing
index.js(#2455, #2461)Yarn PnP's tests require the resolved paths to end in
/. That's not how the rest of esbuild's internals work, however, and doing this messed up esbuild's node module path resolution regarding automatically-detectedindex.jsfiles. Previously packages that relied on implicitindex.jsresolution rules didn't work with esbuild under Yarn PnP. Removing this slash has fixed esbuild's path resolution behavior regardingindex.js, which should now the same both with and without Yarn PnP. -
Fix Yarn PnP support for
extendsintsconfig.json(#2456)Previously using
extendsintsconfig.jsonwith a path in a Yarn PnP package didn't work. This is because the process of setting up package path resolution rules requires parsingtsconfig.jsonfiles (due to thebaseUrlandpathsfeatures) and resolvingextendsto a package path requires package path resolution rules to already be set up, which is a circular dependency. This cycle is broken by using special rules forextendsintsconfig.jsonthat bypasses esbuild's normal package path resolution process. This is why usingextendswith a Yarn PnP package didn't automatically work. With this release, these special rules have been modified to check for a Yarn PnP manifest so this case should work now. -
Fix Yarn PnP support in
esbuild-wasm(#2458)When running esbuild via WebAssembly, Yarn PnP support previously failed because Go's file system internals return
EINVALwhen trying to read a.zipfile as a directory when run with WebAssembly. This was unexpected because Go's file system internals returnENOTDIRfor this case on native. This release updates esbuild to treatEINVALlikeENOTDIRin this case, which fixes usingesbuild-wasmto bundle a Yarn PnP project.Note that to be able to use
esbuild-wasmfor Yarn PnP successfully, you currently have to run it usingnodeinstead ofyarn node. This is because the file system shim that Yarn overwrites node's native file system API with currently generates invalid file descriptors with negative values when inside a.zipfile. This prevents esbuild from working correctly because Go's file system internals don't expect syscalls that succeed without an error to return an invalid file descriptor. Yarn is working on fixing their use of invalid file descriptors.
rollup/rollup
v2.78.0
2022-08-14
Features
- Support writing plugin hooks as objects with a "handler" property (#4600)
- Allow changing execution order per plugin hook (#4600)
- Add flag to execute plugins in async parallel hooks sequentially (#4600)
Pull Requests
- #4600: Allow using objects as hooks to change execution order (@lukastaegert)
vitest-dev/vitest
v0.22.0
🚨 Breaking Changes
c8coverage support now require peer dependency@vitest/coverage-c8to be installed. Alternatively, you can install@vitest/coverage-istanbulto useistanbulfor coverage instead ofc8.
🚀 Features
- Add --no-color to cli - by @jereklas in https://github.com/vitest-dev/vitest/issues/1849
- Support auto retry on Node segfault
--segfault-retry- by @tony19 @antfu in https://github.com/vitest-dev/vitest/issues/1854 - Support
istanbulcoverage provider - by @AriPerkkio and @antfu in https://github.com/vitest-dev/vitest/issues/1676 - cli: Support passing
--inspectand--inspect-brk- by @antfu (ea80f)
🐞 Bug Fixes
- Handle undefined returns of module mocks, and update migration docs - by @jereklas in https://github.com/vitest-dev/vitest/issues/1763 and https://github.com/vitest-dev/vitest/issues/1830
- Clear pattern when rerun all tests - by @ChpShy in https://github.com/vitest-dev/vitest/issues/1834
- reporter-junit: Remove trailing zeros in duration - by @nieyuyao in https://github.com/vitest-dev/vitest/issues/1842
View changes on GitHub
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.