Skip to content

Commit

Permalink
Merge pull request #16 from XantreGodlike/changeset-release/main
Browse files Browse the repository at this point in the history
Version Packages
  • Loading branch information
XantreDev authored Oct 17, 2023
2 parents 8680658 + 7ca57b0 commit c810c0e
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 62 deletions.
5 changes: 0 additions & 5 deletions .changeset/chilly-monkeys-add.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changeset/giant-papayas-hear.md

This file was deleted.

34 changes: 0 additions & 34 deletions .changeset/gold-spies-battle.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-sloths-care.md

This file was deleted.

52 changes: 52 additions & 0 deletions packages/react-fast-hoc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# react-fast-hoc

## 0.3.0

### Minor Changes

- d2cc312: Deprecated `mimicToNewComponent` and make default to false (true was before)
- 8680658: Made displayName editable for each transformed component:

```tsx
const _ = transformProps(A, (props) => props, {
displayNameTransform: {
value: (name) => name + "C",
type: "rewrite-dynamic",
},
});
expect(_.displayName).toBe("AC");
_.displayName = "D";
expect(_.displayName).toBe("D");
```

- d2cc312: Added new syntax for name rewriting, old one is deprecated and will be removed soon

Static name rewrite

```tsx
transformProps(B, (props) => props, {
displayNameTransform: {
type: "rewrite",
value: "D",
},
});
transformProps(A, (props) => props, {
displayNameTransform: {
type: "prefix",
value: "CBC",
},
});
```

Dynamic name rewrite

```tsx
transformProps(A, (props) => props, {
displayNameTransform: {
value: (name) => name + "C",
type: "rewrite-dynamic",
},
});
```

- f057209: Added support for components wrapped with `React.lazy`

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-fast-hoc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-fast-hoc",
"license": "MIT",
"version": "0.2.1",
"version": "0.3.0",
"sideEffects": false,
"type": "module",
"publishConfig": {
Expand Down

0 comments on commit c810c0e

Please sign in to comment.