Skip to content

Docs cleanup#1

Merged
caridy merged 2 commits intoformatjs:masterfrom
juandopazo:docs
Jun 18, 2014
Merged

Docs cleanup#1
caridy merged 2 commits intoformatjs:masterfrom
juandopazo:docs

Conversation

@juandopazo
Copy link
Contributor

Just some cleanup.

README.md Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might change the meaning

Is that true? Or did you mean "change the structure of the sentence"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the structure should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

caridy added a commit that referenced this pull request Jun 18, 2014
@caridy caridy merged commit 7cf71c8 into formatjs:master Jun 18, 2014
@juandopazo juandopazo deleted the docs branch October 3, 2014 21:02
@DWboutin DWboutin mentioned this pull request Sep 1, 2016
longlho pushed a commit that referenced this pull request Apr 27, 2020
longlho pushed a commit that referenced this pull request Apr 27, 2020
longlho pushed a commit that referenced this pull request Apr 27, 2020
longlho pushed a commit that referenced this pull request Apr 27, 2020
longlho pushed a commit that referenced this pull request Apr 27, 2020
Revamp build process and separate CLDR data
longlho pushed a commit that referenced this pull request Apr 27, 2020
Fix bug with month and year diff calculation
longlho pushed a commit that referenced this pull request Apr 27, 2020
longlho added a commit that referenced this pull request Mar 16, 2026
…k, Rollup, esbuild, Rspack

Create `@formatjs/unplugin` as a universal build plugin powered by unplugin that provides
the same FormatJS AST transformations across all major bundlers with a single codebase.

The core `transform.ts` (451 lines) is moved from `@formatjs/vite-plugin` into this new
package. `@formatjs/vite-plugin` becomes a thin re-export from `@formatjs/unplugin/vite`
for backward compatibility.

Key changes:
- New `packages/unplugin/` with entry points for vite, webpack, rollup, esbuild, rspack
- `packages/vite-plugin/` simplified to 2-line re-export wrapper
- 51 unit tests (47 transform + 4 factory tests)
- Full documentation with usage examples for all 5 bundlers
- Added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG` for packages depending on unplugin
- Added `skipLibCheck` to vitest test tsconfig for transitive type compatibility

Closes UPCOMING.md item #1 (Vite Plugin Adoption).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
longlho added a commit that referenced this pull request Mar 16, 2026
…k, Rollup, esbuild, Rspack

Create `@formatjs/unplugin` as a universal build plugin powered by unplugin that provides
the same FormatJS AST transformations across all major bundlers with a single codebase.

The core `transform.ts` (451 lines) is moved from `@formatjs/vite-plugin` into this new
package. `@formatjs/vite-plugin` becomes a thin re-export from `@formatjs/unplugin/vite`
for backward compatibility.

Key changes:
- New `packages/unplugin/` with entry points for vite, webpack, rollup, esbuild, rspack
- `packages/vite-plugin/` simplified to 2-line re-export wrapper
- 51 unit tests (47 transform + 4 factory tests)
- Full documentation with usage examples for all 5 bundlers
- Added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG` for packages depending on unplugin
- Added `skipLibCheck` to vitest test tsconfig for transitive type compatibility

Closes UPCOMING.md item #1 (Vite Plugin Adoption).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
longlho added a commit that referenced this pull request Mar 16, 2026
…ollup, esbuild, Rspack (#6096)

## Summary

- Create `@formatjs/unplugin` — a universal build plugin powered by
[unplugin](https://github.com/unjs/unplugin) that provides FormatJS AST
transformations (ID generation, description removal, AST pre-parsing)
across all major bundlers with a single codebase
- `@formatjs/vite-plugin` becomes a thin 2-line re-export from
`@formatjs/unplugin/vite` for backward compatibility — zero breaking
changes for existing users
- Full documentation with usage examples for Vite, Webpack, Rollup,
esbuild, and Rspack

Closes UPCOMING.md item #1 (Vite Plugin Adoption: 689/week vs 276K for
babel-plugin).

## What changed

### New: `packages/unplugin/`
- `transform.ts` — core transform logic (moved from vite-plugin, 451
lines, unchanged)
- `index.ts` — `createUnplugin` factory with `transformInclude` +
`transform` hooks
- `vite.ts`, `webpack.ts`, `rollup.ts`, `esbuild.ts`, `rspack.ts` —
bundler entry points
- `package.json` — exports for `.`, `./vite`, `./webpack`, `./rollup`,
`./esbuild`, `./rspack`, `./transform`
- 51 unit tests (47 transform + 4 factory)

### Updated: `packages/vite-plugin/`
- `index.ts` → 2-line re-export from `@formatjs/unplugin/vite`
- `transform.ts` → deleted (moved to unplugin)
- `tests/` → deleted (moved to unplugin)
- Integration tests stay and all 10 pass

### Build system
- `tools/tsconfig.bzl` — added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG`
(unplugin's types import from all bundlers)
- `tools/vitest.bzl` — added `skipLibCheck` to test tsconfig for
transitive type compatibility

### Docs
- New `docs/src/docs/tooling/unplugin.mdx` — full docs with all 5
bundler examples + migration guides
- Updated `vite-plugin.mdx` — tip recommending unplugin for new projects
- Updated `bundler-plugins.mdx` — added unplugin section with tabbed
examples
- Updated navigation tree

## Test plan

- [x] `bazel test //packages/unplugin:unit_test` — 51 tests pass
- [x] `bazel test
//packages/unplugin:unit_test_typecheck_typecheck_test` — type-check
passes
- [x] `bazel test
//packages/vite-plugin/integration-tests:integration_test` — 10
integration tests pass (backward compat)
- [x] `bazel test //docs:docs_metadata_test` — docs metadata up to date
- [x] `pnpm t` — 484/487 pass (3 pre-existing failures in
react-intl/vue-intl sandbox resolution, confirmed on clean main)
- [x] All pre-commit hooks pass (format, lint, commitlint)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants