Skip to content

Commit

Permalink
Merge pull request #270 from jaredh159/changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredh159 authored Feb 12, 2024
2 parents d3716f6 + f4f5d44 commit 96c9740
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 44 deletions.
103 changes: 103 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Changelog

All notable changes to this project will be documented in this file. The format is based
on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[comment]: # 'Section Titles: Added/Fixed/Changed/Removed'

## [3.6.9] - 2024-02-12

### Fixed

- edge case with dark-mode and color opacity shorthands
[(#269)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/269)

## [3.6.8] - 2024-01-17

### Fixed

- support TS `moduleResolution: "NodeNext"` w/ `types` export
[(#263)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/263)

### Changed

- update dev-only deps and config

## [3.6.7] - 2023-12-17

### Fixed

- fix breakpoint/prefix resolution of string-based custom utilities
[(#259)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/259)

## [3.6.6] - 2023-12-11

### Fixed

- handle negative z-index utilities (e.g. `-z-30`)
[(#258)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/258)

## [3.6.5] - 2023-11-29

### Fixed

- export documented `style` fn
[(#255)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/255)

### Changed

- add test for media-query custom utility
[(#255)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/255)
- codestyle: switch to explicit TS `type` imports
[(#255)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/255)

## [3.6.4] - 2023-08-09

### Changed

- perf: ensure cached utilities referrentially equal to prevent re-renders
[(#241)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/241)

## [3.6.3] - 2023-07-19

### Fixed

- support inset `auto` utilities (e.g. `top-auto`)
[(#237)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/237)

## [3.6.2] - 2023-07-11

### Changed

- chore: support leading dots in custom utilities to improve intellisense
[(#236)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/236)
- docs: add intellisense instructions to readme
[(#228)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/228)
- docs: add expo dark mode note to readme
[(#229)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/229)

## [3.6.1] - 2023-05-22

### Fixed

- fix ordering/cache issue with utility prefixes
[(#227)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/227)

## [3.6.0] - 2023-01-18

### Added

- support flex-gap, newly supported in RN 0.71
[(#212)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/212)

## [3.5.0] - 2022-12-12

### Added

- support flex-basis
[(#204)](https://github.com/jaredh159/tailwind-react-native-classnames/pull/204)

---

[...more older releases, not documented here (yet)](https://github.com/jaredh159/tailwind-react-native-classnames/commits/master/?after=d3716f6549bfd0c392c8e00cf8a9892ba34e41ea+34)
42 changes: 42 additions & 0 deletions migration-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Migrating from 2.x.x

**Color renames**. In line with the
[upgrade guide](https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases),
tailwind v3 has mapped `green`, `yellow`, and `purple` to their extended colors.
Additionally,
[gray colors](https://tailwindcss.com/docs/upgrade-guide#renamed-gray-scales) were renamed
in the extended colors to be more specific. Both of these can be resolved by following
tailwind's upgrade guide and optionally re-aliasing the colors in your
`tailwind.config.js`.

Other than checking on any changes caused by color renames in tailwindcss, there are no
breaking changes in v3 of this library, no further changes should be necessary.

New v3 prefixes and classes are being added as we identify use cases. If you do have a
feature that would help your development, please
[open an issue](https://github.com/jaredh159/tailwind-react-native-classnames/issues/new)
and include any libraries / hooks that could help someone in the community put a PR
together.

## Migrating from 1.x.x

**1.** During the rewrite, the package name on npm was changed to `twrnc`. To remove the
old library and install v2, run:

```
npm uninstall tailwind-react-native-classnames
npm install twrnc
```

**2.** Grep through your project replacing `from 'tailwind-react-native-classnames'` with
`from 'twrnc'`.

**3.** If you were using a `tailwind.config.js` you can `git rm` your `tw-rn-styles.json`
file, and switch to passing your config directly to `create` as shown below: (details
[here](#customization))

```js
const tw = create(require(`../../tailwind.config.js`));
```

That's it! 🎉 The core API and functionality should work exactly the same from v1 to v2.
49 changes: 5 additions & 44 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const MyComponent = () => (
[image](https://reactnative.dev/docs/image-style-props),
[shadow](https://reactnative.dev/docs/shadow-props), and
[text](https://reactnative.dev/docs/text-style-props)).
- very fast: best performance of all RN styling libraries, according to
[this benchmark](https://github.com/efstathiosntonas/react-native-style-libraries-benchmark).
- compatible with Tailwind CSS v3 and v2
- respects your `tailwind.config.js` for full configuration
- platform prefixes: `android:mt-4 ios:mt-2`
Expand All @@ -34,7 +36,6 @@ const MyComponent = () => (
- merges supplied RN style objects for unsupported utilities or complex use cases
- supports custom utility creation via standard
[plugin config](https://tailwindcss.com/docs/adding-new-utilities#using-a-plugin).
- heavily optimized for performance - styles resolved once, then stored in in-memory cache
- flexible, conditional styles based on
[classnames package api](https://github.com/JedWatson/classnames).
- written 100% in Typescript, ships with types
Expand All @@ -53,8 +54,7 @@ const MyComponent = () => (
- [RN-Only Additions](#rn-only-additions)
- [JIT-style Arbitrary Values](#jit-style-arbitrary-values)
- [VS Code Intellisense](#vs-code-intellisense)
- [Migrating from V2](#migrating-from-v2)
- [Migrating from V1](#migrating-from-v1)
- [Migrating from previous versions](#migrating-from-previous-versions)
- [Prior Art](#prior-art)

## Installation
Expand Down Expand Up @@ -453,48 +453,9 @@ for VS Code.
More detailed instructions, including how to add snippets, are available
[here](https://github.com/jaredh159/tailwind-react-native-classnames/discussions/124).

## Migrating from V2
## Migrating from Previous Versions

**Color renames**. In line with the
[upgrade guide](https://tailwindcss.com/docs/upgrade-guide#removed-color-aliases),
tailwind v3 has mapped `green`, `yellow`, and `purple` to their extended colors.
Additionally,
[gray colors](https://tailwindcss.com/docs/upgrade-guide#renamed-gray-scales) were renamed
in the extended colors to be more specific. Both of these can be resolved by following
tailwind's upgrade guide and optionally re-aliasing the colors in your
`tailwind.config.js`.

Other than checking on any changes caused by color renames in tailwindcss, there are no
breaking changes in V3 of this library, no further changes should be necessary.

New v3 prefixes and classes are being added as we identify use cases. If you do have a
feature that would help your development, please
[open an issue](https://github.com/jaredh159/tailwind-react-native-classnames/issues/new)
and include any libraries / hooks that could help someone in the community put a PR
together.

## Migrating from V1

**1.** During the rewrite, the package name on npm was changed to `twrnc`. To remove the
old library and install v2, run:

```
npm uninstall tailwind-react-native-classnames
npm install twrnc
```

**2.** Grep through your project replacing `from 'tailwind-react-native-classnames'` with
`from 'twrnc'`.

**3.** If you were using a `tailwind.config.js` you can `git rm` your `tw-rn-styles.json`
file, and switch to passing your config directly to `create` as shown below: (details
[here](#customization))

```js
const tw = create(require(`../../tailwind.config.js`));
```

That's it! 🎉 The core API and functionality should work exactly the same from v1 to v2.
See [migration-guide.md](/migration-guide.md).

## Prior Art

Expand Down

0 comments on commit 96c9740

Please sign in to comment.