Skip to content

Commit

Permalink
Docs: Document removal of QUnit.extend()
Browse files Browse the repository at this point in the history
Ref #1491.
  • Loading branch information
Krinkle committed May 29, 2024
1 parent 82c4790 commit 335b040
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions build/prep-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ function versionDeprecatedString (version) {
return `version_deprecated: "${version}"`;
}

function versionRemovedString (version) {
return `version_removed: "${version}"`;
}

function formatChangelogColumn (version) {
return `[QUnit ${version}](https://github.com/qunitjs/qunit/releases/tag/${version})`;
}
Expand All @@ -33,6 +37,7 @@ const Repo = {
{
const UNRELEASED_ADDED = versionAddedString('unreleased');
const UNRELEASED_DEP = versionDeprecatedString('unreleased');
const UNRELEASED_RM = versionRemovedString('unreleased');
const UNRELEASED_CONTENT = /\bUNRELEASED\b/g;

// Silence error from grep, which exits non-zero if no results.
Expand All @@ -46,6 +51,7 @@ const Repo = {
doc
.replace(UNRELEASED_ADDED, versionAddedString(version))
.replace(UNRELEASED_DEP, versionDeprecatedString(version))
.replace(UNRELEASED_RM, versionRemovedString(version))
.replace(UNRELEASED_CONTENT, formatChangelogColumn(version))
);
});
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/sidebar_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
- group: deprecated
expand: false

# - group: removed
# expand: false
- group: removed
expand: false
7 changes: 7 additions & 0 deletions docs/api/extension/QUnit.extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ excerpt: Copy the properties from one object into a target object.
groups:
- extension
- deprecated
- removed
redirect_from:
- "/config/QUnit.extend/"
- "/extension/QUnit.extend/"
version_added: "1.0.0"
version_deprecated: "2.12.0"
version_removed: "unreleased"
---

`QUnit.extend( target, mixin )`
Expand All @@ -25,6 +27,11 @@ Copy the properties defined by a mixin object into a target object.

This method will modify the `target` object to contain the "own" properties defined by the `mixin`. If the `mixin` object specifies the value of any attribute as `undefined`, this property will instead be removed from the `target` object.

## Changelog

| UNRELEASED | Removed.
| [QUnit 2.12.0](https://github.com/qunitjs/qunit/releases/tag/2.12.0) | Deprecated. Use `Object.assign()` instead.

## Examples

Use `QUnit.extend` to merge two objects.
Expand Down

0 comments on commit 335b040

Please sign in to comment.