Skip to content

Commit

Permalink
doc: migration guide -> v6
Browse files Browse the repository at this point in the history
  • Loading branch information
Anber committed Dec 5, 2023
1 parent a79e961 commit 0b860eb
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .changeset/grumpy-flowers-watch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
'@linaria/atomic': patch
'@linaria/babel-preset': patch
'@linaria/testkit': patch
'@linaria/atomic': major
'@linaria/babel-preset': major
'@linaria/testkit': major
---

Stylis has been upgraded from v3 to v4.
35 changes: 34 additions & 1 deletion .changeset/violet-eyes-cheat.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,37 @@
'@linaria/server': major
---

Linaria has been migrated to wyw-in-js
BREAKING CHANGE: Linaria has been migrated to wyw-in-js.

# Migration Guide

## For Users

The main breaking change is that all tooling has been moved from the `@linaria` scope to the `@wyw-in-js` scope. This means that you will need to update your dependencies as follows:

- `@linaria/vite` -> `@wyw-in-js/vite`
- `@linaria/cli` -> `@wyw-in-js/cli`
- `@linaria/babel-preset` -> `@wyw-in-js/babel-preset`

However, the `atomic`, `core`, and `styled` imports remain in the `@linaria` scope.

Additionally, support for Webpack v4 has been dropped. The webpack plugins have been renamed:

- `@linaria/webpack4-loader` has been discontinued
- `@linaria/webpack5-loader` has been renamed to `@wyw-in-js/webpack-loader`

There is no longer a need to install `@linaria/shaker` as it is now part of `@wyw-in-js/transform`, which will be installed automatically with the bundler plugins.

The configuration file has been renamed from `linariarc` to `wyw-in-jsrc`.

## For Custom Processor Developers

Base classes for processors and most helpers have been moved to `@wyw-in-js/processor-utils`.

All APIs that had `linaria` in their names have been renamed:

- The field that stores meta information in runtime has been renamed from `__linaria` to `__wyw_meta`
- The export with all interpolated values has been renamed from `__linariaPreval` to `__wywPreval`
- The caller name in Babel has been renamed from `linaria` to `wyw-in-js`

For additional information, please visit the [wyw-in-js.dev](https://wyw-in-js.dev).
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,15 @@ yarn add @linaria/core @linaria/react @linaria/babel-preset

## Setup

Linaria currently supports webpack and Rollup to extract the CSS at build time. To configure your bundler, check the following guides:
Linaria is now built on top of [wyw-in-js.dev](https://wyw-in-js.dev/). It supports various bundlers to extract the CSS at build time. To configure your bundler, check the following guides on the wyw-in-js.dev site:

- [webpack](/docs/BUNDLERS_INTEGRATION.md#webpack)
- [esbuild](/docs/BUNDLERS_INTEGRATION.md#esbuild)
- [Rollup](/docs/BUNDLERS_INTEGRATION.md#rollup)
- [Vite](/docs/BUNDLERS_INTEGRATION.md#vite)
- [Svelte](/docs/BUNDLERS_INTEGRATION.md#svelte)
- [webpack](https://wyw-in-js.dev/bundlers/webpack)
- [esbuild](https://wyw-in-js.dev/bundlers/esbuild)
- [Rollup](https://wyw-in-js.dev/bundlers/rollup)
- [Vite](https://wyw-in-js.dev/bundlers/vite)
- [Svelte](https://wyw-in-js.dev/bundlers/svelte)

Or configure Linaria with one of the following integrations:

- [Preact](/docs/CONFIGURATION.md#preact)
- [Gatsby](/docs/CONFIGURATION.md#gatsby)

Optionally, add the `@linaria` preset to your Babel configuration at the end of the presets list to avoid errors when importing the components in your server code or tests:

```json
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@linaria"
]
}
```

See [Configuration](/docs/CONFIGURATION.md) to customize how Linaria processes your files.
See [Configuration](https://wyw-in-js.dev/configuration) to customize how Linaria processes your files.

## Syntax

Expand Down
33 changes: 33 additions & 0 deletions docs/MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Migration Guide

# 6.x from 5.x, 4.x, 3.x

## For Users

The main breaking change is that all tooling has been moved from the `@linaria` scope to the `@wyw-in-js` scope. This means that you will need to update your dependencies as follows:

- `@linaria/vite` -> `@wyw-in-js/vite`
- `@linaria/cli` -> `@wyw-in-js/cli`
- `@linaria/babel-preset` -> `@wyw-in-js/babel-preset`

However, the `atomic`, `core`, and `styled` imports remain in the `@linaria` scope.

Additionally, support for Webpack v4 has been dropped. The webpack plugins have been renamed:

- `@linaria/webpack4-loader` has been discontinued
- `@linaria/webpack5-loader` has been renamed to `@wyw-in-js/webpack-loader`

There is no longer a need to install `@linaria/shaker` as it is now part of `@wyw-in-js/transform`, which will be installed automatically with the bundler plugins.

The configuration file has been renamed from `linariarc` to `wyw-in-jsrc`.

## For Custom Processor Developers

Base classes for processors and most helpers have been moved to `@wyw-in-js/processor-utils`.

All APIs that had `linaria` in their names have been renamed:

- The field that stores meta information in runtime has been renamed from `__linaria` to `__wyw_meta`
- The export with all interpolated values has been renamed from `__linariaPreval` to `__wywPreval`
- The caller name in Babel has been renamed from `linaria` to `wyw-in-js`

For additional information, please visit the [wyw-in-js.dev](https://wyw-in-js.dev).

# 4.x, 3.x from 2.x

This release was mostly a refactor to [split into more packages](https://github.com/callstack/linaria/pull/687/).
Expand Down

0 comments on commit 0b860eb

Please sign in to comment.