From 8a2559525b51d8f3f037f3363ce406a604872dfc Mon Sep 17 00:00:00 2001 From: "Xunnamius (Romulus)" Date: Wed, 18 Jan 2023 04:04:24 -0800 Subject: [PATCH] release: 11.0.0 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [11.0.0](https://github.com/babel-utils/babel-plugin-tester/compare/v10.1.0...v11.0.0) (2023-01-18) ### 💥 BREAKING CHANGES 💥 * In previous versions, the lodash.mergeWith customizer skipped source properties that resolved to `undefined`. With this version, the customizer now unsets these properties (sets them to `undefined`), allowing the end user to easily unset defaults (e.g. `filename`). * `babelOptions.filename` is now set to `filepath` by default rather than `undefined`. * **Implicit "global" options merging is no longer supported** In previous versions of babel-plugin-tester, any test object and fixture configuration option could be passed directly to babel-plugin-tester and apply "globally" across all test objects and fixtures. This was even the case for options that made no sense in a "global" context, such as `only`, `skip`, and `code`. In this version of babel-plugin-tester, only options explicitly listed in the documentation can be passed directly and applied globally. Unrecognized "rest" options are silently ignored. * **Test/fixture configuration is resolved early and consistently** In previous versions of babel-plugin-tester, test object and fixture configuration options were resolved in various places, with some options getting finalized before `it(...)` and `describe(...)` were called and others being determined as Jest was executing the test. In this version, all configuration options are resolved and finalized before `it(...)` and `describe(...)` are called. This also means configurations are finalized _before_ hooks like `beforeAll` get called by the testing framework. * **Fixture configuration schema is standardized** In previous versions of babel-plugin-tester, you could provide any key to `options.json` and it would be passed as-is to the plugin under test. This made it impossible to allow fixtures to be configured with the same flexibility as test objects. In this version of babel-plugin-tester, fixture `options.json` (and `options.js`) files must return a standard set of options. Non-standard properties are silently ignored. For instance: to pass options to the plugin under test, they must be provided via `pluginOptions`. * **Global `setup`/`teardown` no longer overwrites local versions** In previous versions of babel-plugin-tester, test-level `setup` and `teardown` functions overrode global `setup` and `teardown` functions. In this version of babel-plugin-tester, the global `setup` and `teardown` functions will be called alongside their test-level counterparts for each test and in a well-defined order (see documentation). * **`TypeError` for config error; `AssertionError` for test error** All configuration-related issues now throw `TypeError` instead of `AssertionError`. `AssertionError` is now exclusively used for failing tests. Additionally, the text of some error messages has been updated. * **`error` only captures exceptions from Babel** `error` (aka `throws`) no longer potentially captures exceptions thrown by the `formatResult` function. If the `formatResult` function throws, the entire test will fail immediately. * **`error` no longer accepts arbitrary class constructors** `error` (aka `throws`) no longer accepts arbitrary class constructors. Any provided class constructor must extend `Error`, e.g. built-ins like `SyntaxError` or custom error classes like `class MyError extends Error`. Thanks to the nature of JavaScript, **providing a class constructor that does not extend `Error` will lead to undefined behavior**. * **Built-in TypeScript support** TypeScript types are now included within the package itself, obviating the need to install a separate types package. Installing the old types package alongside this version of babel-plugin-tester will cause conflicts. * **Global `describe` and `it` functions must be defined** babel-plugin-tester will refuse to run if `describe`, `it`, `it.only`, or `it.skip` are not globally available. * **All test titles are now numbered** All test titles are now numbered (e.g. `"1. ..."`, `"2. ..."`, etc), including fixtures tests and tests with custom titles. * Minimum recommended node version bumped from 10.13.0 to 14.20.0 * Plugin names are once again automatically determined by analyzing the return value of the plugin function. Though this is implemented in a backwards-compatible way, there is a [small caveat](https://github.com/babel-utils/babel-plugin-tester#pluginname-inference-caveat). #### ✨ Features * Add support for testing presets ([73b90b3](https://github.com/babel-utils/babel-plugin-tester/commit/73b90b347051661ccc37d663419c1d89348dedfb)) * Implement default filepath inference using Error stack trace ([9d1b321](https://github.com/babel-utils/babel-plugin-tester/commit/9d1b321e162f337963faf84c2e7a9323c55c5155)) * **src:** add `exec`/`execFixture` support via Node's VM module ([4754f42](https://github.com/babel-utils/babel-plugin-tester/commit/4754f42d0a6e66b9cd0c26f8ec7b4bc935ac79d4)) * **src:** add support for "only", "skip", and "title" test options in fixtures ([#90](https://github.com/babel-utils/babel-plugin-tester/issues/90)) ([89b58b5](https://github.com/babel-utils/babel-plugin-tester/commit/89b58b5c39b2b43dff77fac7243e7a17c5297053)) * **src:** add support for arbitrary run order of plugin under test ([#91](https://github.com/babel-utils/babel-plugin-tester/issues/91)) ([8c8b858](https://github.com/babel-utils/babel-plugin-tester/commit/8c8b858eb8e73493616563552360fb8e7fe8c452)) * **src:** add support for loading prettier configuration files in fixtures ([f54deda](https://github.com/babel-utils/babel-plugin-tester/commit/f54dedaa9c1cf6f7546d2f1bceaa44407049dd6e)) * **src:** add TEST_SKIP/TEST_NUM_SKIP/TEST_ONLY/TEST_NUM_ONLY env variable support ([13626d1](https://github.com/babel-utils/babel-plugin-tester/commit/13626d16b655a241bdffcb904b085ec62c79c6ec)) * **src:** bring back (lightweight) plugin name inference ([#92](https://github.com/babel-utils/babel-plugin-tester/issues/92)) ([f9ad903](https://github.com/babel-utils/babel-plugin-tester/commit/f9ad9034e062c48ae0aeab85248ee0cefc991853)) * **src:** implement `titleNumbering` and `restartTitleNumbering` options ([09e792d](https://github.com/babel-utils/babel-plugin-tester/commit/09e792da2de0c5ac802c58096fb3dd03b7eb0b52)) * **src:** implement standard `setup`/`teardown` run order ([4ea283f](https://github.com/babel-utils/babel-plugin-tester/commit/4ea283f4e73d69b7e77abb982c76cf4ff0d6b0e4)) * **src:** provide debug output support via debug package ([4c7c6e7](https://github.com/babel-utils/babel-plugin-tester/commit/4c7c6e7094680d21ab59786b7f87fcfcfde332d2)) * Windows support ([f214995](https://github.com/babel-utils/babel-plugin-tester/commit/f214995024e8c86ada4f9fd4b2a927e1767920a7)) #### 🪄 Fixes * **src:** ensure test function errors are not swallowed by teardown function errors ([2acfe37](https://github.com/babel-utils/babel-plugin-tester/commit/2acfe37996080c26d96504b9837bc2dc5284eaa2)) * **src:** fix fixtureOutputExt being ignored in root options.json ([#89](https://github.com/babel-utils/babel-plugin-tester/issues/89)) ([481be19](https://github.com/babel-utils/babel-plugin-tester/commit/481be191651b3b5d4a0fd550146a76a6e1e819c4)) * **src:** fix plugin run order for fixtures to match tests ([#88](https://github.com/babel-utils/babel-plugin-tester/issues/88)) ([fbb6c19](https://github.com/babel-utils/babel-plugin-tester/commit/fbb6c1924f7f44d72ec12892cdce1df9aea09528)) #### ⚙️ Build system * **deps:** bump prettier from 2.8.0 to 2.8.1 ([#98](https://github.com/babel-utils/babel-plugin-tester/issues/98)) ([0bdb351](https://github.com/babel-utils/babel-plugin-tester/commit/0bdb3515c69a0eaef2e9cb251772083e946e425a)) * **package:** restore @babel/core@7.11.6 as minimum supported version ([00712c0](https://github.com/babel-utils/babel-plugin-tester/commit/00712c067253599c37b43cdf648c232be414e0a9)) * Transmute codebase to TypeScript ([#96](https://github.com/babel-utils/babel-plugin-tester/issues/96)) ([5f588e9](https://github.com/babel-utils/babel-plugin-tester/commit/5f588e9b8e38eb265037a8af54f442e42c302368)) * Update tooling ([d5b4d9c](https://github.com/babel-utils/babel-plugin-tester/commit/d5b4d9c207c3499851025b06449114585f494d1f)) #### 🔥 Reverted * *"test: make debugging names shorter and sweeter"* ([0b869bb](https://github.com/babel-utils/babel-plugin-tester/commit/0b869bb1c7ecfab115293a33233e175cf0738b64)) #### 🧙🏿 Refactored * Lodash.mergeWith customizer now allows unsetting options by setting them to `undefined` ([74af680](https://github.com/babel-utils/babel-plugin-tester/commit/74af680467dbc663cb82a5cd9c6581d1b5216ae5)) * Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392](https://github.com/babel-utils/babel-plugin-tester/commit/0c4439292839da87508d027cbfbf2b7a96e7d6e7)) --- CHANGELOG.md | 8 ++++---- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eac45f..364575e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this auto-generated file. The format is based on [Conventional Commits][1]; this project adheres to [Semantic Versioning][2]. -## [11.0.0-canary.1][3] (2023-01-16) +## [11.0.0][3] (2023-01-18) ### 💥 Breaking Changes 💥 @@ -134,7 +134,7 @@ this project adheres to [Semantic Versioning][2]. - Lodash.mergeWith customizer now allows unsetting options by setting them to `undefined` ([74af680][32]) - Reorganize source into unified extensible tester pipeline w/ first-class fixtures support ([0c44392][33]) -## [0.0.0-semantically-released][34] (2023-01-16) +## [11.0.0-canary.1][34] (2023-01-18) ### 💥 Breaking Changes 💥 @@ -552,7 +552,7 @@ this project adheres to [Semantic Versioning][2]. [1]: https://conventionalcommits.org [2]: https://semver.org -[3]: https://github.com/babel-utils/babel-plugin-tester/compare/v10.1.0...v11.0.0-canary.1 +[3]: https://github.com/babel-utils/babel-plugin-tester/compare/v10.1.0...v11.0.0 [4]: https://github.com/babel-utils/babel-plugin-tester#pluginname-inference-caveat [5]: https://github.com/babel-utils/babel-plugin-tester/commit/73b90b347051661ccc37d663419c1d89348dedfb [6]: https://github.com/babel-utils/babel-plugin-tester/commit/9d1b321e162f337963faf84c2e7a9323c55c5155 @@ -583,7 +583,7 @@ this project adheres to [Semantic Versioning][2]. [31]: https://github.com/babel-utils/babel-plugin-tester/commit/0b869bb1c7ecfab115293a33233e175cf0738b64 [32]: https://github.com/babel-utils/babel-plugin-tester/commit/74af680467dbc663cb82a5cd9c6581d1b5216ae5 [33]: https://github.com/babel-utils/babel-plugin-tester/commit/0c4439292839da87508d027cbfbf2b7a96e7d6e7 -[34]: https://github.com/babel-utils/babel-plugin-tester/compare/v10.1.0...v0.0.0-semantically-released +[34]: https://github.com/babel-utils/babel-plugin-tester/compare/v10.1.0...v11.0.0-canary.1 [35]: https://github.com/babel-utils/babel-plugin-tester/compare/v10.0.0...v10.1.0 [36]: https://github.com/babel-utils/babel-plugin-tester/issues/84 [37]: https://github.com/babel-utils/babel-plugin-tester/commit/969be117ee279603244d0b413156c7995f403bd1 diff --git a/package-lock.json b/package-lock.json index e6d293f..876de66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "babel-plugin-tester", - "version": "11.0.0-canary.1", + "version": "11.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "babel-plugin-tester", - "version": "11.0.0-canary.1", + "version": "11.0.0", "license": "MIT", "dependencies": { "debug": "^4.3.4", diff --git a/package.json b/package.json index f6555b1..409d160 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-tester", - "version": "11.0.0-canary.1", + "version": "11.0.0", "description": "Utilities for testing babel plugins", "keywords": [ "babel",