Skip to content

Commit 5c337ef

Browse files
Merge pull request #256 from hypermod-io/codex/assess-project-and-suggest-improvements
Rebrand to Hypermod and remove in-repo website; update docs links and package READMEs
2 parents d5060bf + a1c226d commit 5c337ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+196
-14010
lines changed

README.md

Lines changed: 108 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,135 @@
11
<picture>
22
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/hypermod-io/hypermod-community/assets/3030010/f4ec415a-b320-4949-b352-0be9b1666f97">
33
<source media="(prefers-color-scheme: light)" srcset="https://github.com/hypermod-io/hypermod-community/assets/3030010/9deed89f-1b24-4914-8007-74551abf40b2">
4-
<img alt="Hypermod – App repository banner" src="https://github.com/hypermod-io/hypermod-community/assets/3030010/9deed89f-1b24-4914-8007-74551abf40b2">
4+
<img alt="Hypermod Community banner" src="https://github.com/hypermod-io/hypermod-community/assets/3030010/9deed89f-1b24-4914-8007-74551abf40b2">
55
</picture>
66

77
# Hypermod Community
88

9-
**Formerly: CodeshiftCommunity**
9+
Hypermod Community is the open-source codemod registry and CLI ecosystem for [Hypermod.io](https://www.hypermod.io/).
10+
Use this repository to discover, author, test, publish, and contribute codemods; use Hypermod.io to explore codemods, learn migration workflows, and promote safer package upgrades at scale.
1011

11-
The community-owned global registry and documentation hub for codemods. Providing library maintainers & users with facilities to help write, test, publish and consume codemods in a structured, standardized and familiar way.
12+
[Explore Hypermod.io](https://www.hypermod.io/)
13+
[Browse codemods](https://www.hypermod.io/explore)
14+
[Read the docs](https://www.hypermod.io/docs)
15+
[Join Discord](https://discord.gg/XGqmKNZ8Rk)
1216

13-
[💬 Join our community on Discord](https://discord.gg/XGqmKNZ8Rk)
17+
## Why this project exists
1418

15-
## Features
19+
Upgrading dependencies is expensive when maintainers only ship changelogs and users are left to translate breaking changes by hand.
20+
Hypermod helps library maintainers, platform teams, design-system teams, and migration owners turn breaking API changes into repeatable codemods that can be shared with the wider ecosystem and used by agents.
1621

17-
🔭 Explore an extensive list of codemods [contributed by the community](https://www.hypermod.io/explore).
22+
This repository is the community-facing home for that workflow:
1823

19-
🧠 Up-skill your engineering team using our [guides & resources](https://www.hypermod.io/docs/guides/your-first-codemod).
24+
- **Community codemod registry** for versioned and reusable codemods.
25+
- **CLI packages** for running codemods locally, from npm, or from Hypermod.io-hosted sources.
26+
- **Authoring utilities** for creating, validating, and testing codemod packages.
27+
- **Examples and templates** that make it easier to ship migrations users can actually adopt.
2028

21-
🎨 Perfect for [Design Systems & Monorepos](https://www.hypermod.io/docs/local-development/monorepos).
29+
## How Hypermod Community and Hypermod.io fit together
2230

23-
## Registry
31+
- **Hypermod.io** is the orchestration and discovery layer: explore codemods, generate codemods, deploy migrations across repositories, and access hosted Hypermod experiences.
32+
- **`@hypermod/cli`** is the command-line entry point for running codemods in local projects, from npm packages, and from Hypermod.io-powered sources.
33+
- **This repository** is the open-source registry, package monorepo, and contribution surface behind the ecosystem.
2434

25-
[The registry](https://www.hypermod.io/explore) contains all community-contributed codemods, hosted and published directly from the Hypermod Platform.
35+
## Get started with the CLI
2636

27-
## CLI
37+
We recommend using the CLI with `npx` so you always run the latest version:
2838

29-
Downloading and running codemods as well as initialising and maintaining codemod packages can all be done via the Hypermod CLI (`@hypermod/cli`).
39+
```bash
40+
npx @hypermod/cli --packages react@18.0.0 ./src
41+
```
3042

31-
[Please see the docs for more information and examples](https://www.hypermod.io/docs/tools/cli)
43+
You can also install it globally:
3244

33-
We recommend running the CLI with `$ npx` to ensure you always have the latest version.
45+
```bash
46+
npm install -g @hypermod/cli
47+
# or
48+
yarn global add @hypermod/cli
49+
```
3450

35-
`$ npx @hypermod/cli --packages mylib@1.0.0 /project/src`
51+
Then run it with either binary:
3652

37-
But it can also be installed globally:
53+
```bash
54+
hypermod --help
55+
# or
56+
hypermod-cli --help
57+
```
3858

39-
`$ npm install -g @hypermod/cli or yarn global add @hypermod/cli`
59+
### Common usage examples
4060

41-
and run with:
61+
#### Run a package migration from npm/community codemods
4262

43-
`$ hypermod or $ hypermod-cli`
63+
```bash
64+
npx @hypermod/cli --packages @atlaskit/button@3.0.0 ./src
65+
```
66+
67+
#### Run all transforms from a version to latest
68+
69+
```bash
70+
npx @hypermod/cli --sequence --packages @mylib/button@3.0.0 ./src
71+
```
72+
73+
#### Run a preset
74+
75+
```bash
76+
npx @hypermod/cli --packages @mylib/button#remove-deprecated-props ./src
77+
```
78+
79+
#### Run a local transform file
80+
81+
```bash
82+
npx @hypermod/cli --transform ./codemods/rename-imports/transform.ts ./src
83+
```
84+
85+
#### Browse available codemods for packages
86+
87+
```bash
88+
npx @hypermod/cli list react @atlaskit/button
89+
```
90+
91+
#### Initialize a new codemod package
92+
93+
```bash
94+
npx @hypermod/cli init --transform 1.0.0 my-codemod-package
95+
```
96+
97+
#### Validate a codemod package
98+
99+
```bash
100+
npx @hypermod/cli validate ./community/my-package
101+
```
102+
103+
## What the CLI supports
104+
105+
`@hypermod/cli` is built for real migration workflows, not just one-off transforms.
106+
107+
- Run codemods from **local transform files**.
108+
- Resolve codemods from **npm packages** and the **community registry**.
109+
- Run **versioned transforms in sequence** for safer upgrades.
110+
- Run **presets** for utility codemods that are not tied to a semver milestone.
111+
- Initialize and validate codemod packages for maintainers and contributors.
112+
- Access Hypermod.io-powered transform sources through the same CLI surface.
113+
114+
For the latest product docs and guides, visit [hypermod.io/docs](https://www.hypermod.io/docs).
115+
116+
## Who this is for
117+
118+
- **Library maintainers** who want to ship upgrades users can actually adopt.
119+
- **Platform and infra teams** performing large-scale migrations across many repositories.
120+
- **Design-system teams** managing frequent component API changes.
121+
- **Application teams** that want safer, faster JavaScript and TypeScript refactors.
122+
123+
## Contributing codemods
124+
125+
Community codemods live in the [`community/`](./community) directory and are published as packages that can be discovered and run through the Hypermod ecosystem.
126+
127+
Useful starting points:
128+
129+
- Browse the community packages in [`community/`](./community)
130+
- Inspect the CLI in [`packages/cli`](./packages/cli)
131+
- Use the package template in [`packages/initializer/template`](./packages/initializer/template)
132+
- Explore product docs on [Hypermod.io](https://www.hypermod.io/docs)
44133

45134
## Used by
46135

community/@atlaskit__breadcrumbs/src/11.0.0/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function transformer(
1818
* It is often good practice to exit early and return the original source file
1919
* if it does not contain code relevant to the codemod.
2020
* See this page for more information:
21-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/your-first-codemod#output
21+
* https://www.hypermod.io/docs/guides/your-first-codemod
2222
*/
2323
if (!hasImportDeclaration(j, source, '@atlaskit/breadcrumbs')) {
2424
return fileInfo.source;
@@ -31,7 +31,7 @@ export default function transformer(
3131
* consider grouping specific actions into 'motions' and running them in sequence
3232
*
3333
* See this page for more information:
34-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/authoring#motions
34+
* https://www.hypermod.io/docs
3535
*/
3636
applyMotions(j, source, [
3737
removeHasSeparator,

community/@atlaskit__popper/src/5.0.0/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function transformer(
1818
* It is often good practice to exit early and return the original source file
1919
* if it does not contain code relevant to the codemod.
2020
* See this page for more information:
21-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/your-first-codemod#output
21+
* https://www.hypermod.io/docs/guides/your-first-codemod
2222
*/
2323
if (!hasImportDeclaration(j, source, '@atlaskit/popper')) {
2424
return fileInfo.source;

community/@atlaskit__tag/src/11.0.0/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function transformer(
1818
* It is often good practice to exit early and return the original source file
1919
* if it does not contain code relevant to the codemod.
2020
* See this page for more information:
21-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/your-first-codemod#output
21+
* https://www.hypermod.io/docs/guides/your-first-codemod
2222
*/
2323
if (!hasImportDeclaration(j, source, '@atlaskit/tag')) {
2424
return fileInfo.source;

community/@atlaskit__toggle/src/11.0.0/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function transformer(
5454
* It is often good practice to exit early and return the original source file
5555
* if it does not contain code relevant to the codemod.
5656
* See this page for more information:
57-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/your-first-codemod#output
57+
* https://www.hypermod.io/docs/guides/your-first-codemod
5858
*/
5959
if (!hasImportDeclaration(j, source, '@atlaskit/toggle')) {
6060
return fileInfo.source;

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"license": "MIT",
88
"private": true,
99
"scripts": {
10-
"predocs:start": "ts-node scripts/docs",
11-
"docs:start": "cd website && yarn start",
1210
"postinstall": "yarn monorepo:fix && yarn monorepo:check",
1311
"build": "yarn build:pkgs && yarn build:community",
1412
"build:pkgs": "tsc --build tsconfig.packages.json",

packages/cli-alias/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @codeshift/cli
22

3-
**THIS PACKAGE IS DEPRECATED IN FAVOUR OF [@hypermod/cli](https://www.codeshiftcommunity.com/docs/cli)**
3+
**THIS PACKAGE IS DEPRECATED IN FAVOUR OF [@hypermod/cli](https://www.hypermod.io/docs)**
44

55
No API changes were performed as part of this change, use `@hypermod/cli` as a direct replacement the package has simply been renamed.
66

packages/cli/README.md

Lines changed: 74 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,80 @@
11
# @hypermod/cli
22

3-
To download and run codemods, we provide a CLI tool called @hypermod/cli.
3+
`@hypermod/cli` is the command-line interface for running codemods from local files, npm packages, the Hypermod community registry, and Hypermod.io-powered sources.
44

5-
`@hypermod/cli` is responsible for running the provided transform against your entire codebase. Under the hood, it is a wrapper of jscodeshift's CLI, which provides additional functionality.
5+
It builds on top of `jscodeshift` and adds workflow features needed for real package migrations:
66

7-
- Ability to run community codemods hosted on npm
8-
- Runs versioned codemods in sequence
9-
- Always runs the latest version of a codemod
10-
- The CLI allows you to run transforms either from the the [public registry](https://www.codeshiftcommunity.com/docs/registry) or on your local machine as per the original implementation of jscodeshift
7+
- Run codemods from local transform files.
8+
- Resolve codemods from npm packages and the community registry.
9+
- Run versioned codemods in sequence.
10+
- Run presets using the same package addressing format.
11+
- Initialize and validate codemod packages.
12+
- Use the same CLI surface for Hypermod.io-powered transforms.
1113

12-
_Note:_ Codemods are designed to do the heavy lifting, but they may not be perfect, so some manual work may still be required in order to successfully migrate.
14+
> Codemods are designed to do the heavy lifting, but some manual review may still be required after running a migration.
1315
14-
[Documentation](https://www.codeshiftcommunity.com/docs/cli)
16+
## Install
17+
18+
Use `npx` for the latest version:
19+
20+
```bash
21+
npx @hypermod/cli --help
22+
```
23+
24+
Or install globally:
25+
26+
```bash
27+
npm install -g @hypermod/cli
28+
# or
29+
yarn global add @hypermod/cli
30+
```
31+
32+
## Usage
33+
34+
### Run a package migration
35+
36+
```bash
37+
npx @hypermod/cli --packages react@18.0.0 ./src
38+
```
39+
40+
### Run all transforms since a version
41+
42+
```bash
43+
npx @hypermod/cli --sequence --packages @mylib/button@3.0.0 ./src
44+
```
45+
46+
### Run a preset
47+
48+
```bash
49+
npx @hypermod/cli --packages @mylib/button#remove-deprecated-props ./src
50+
```
51+
52+
### Run a local transform
53+
54+
```bash
55+
npx @hypermod/cli --transform ./codemods/rename-imports/transform.ts ./src
56+
```
57+
58+
### List available codemods
59+
60+
```bash
61+
npx @hypermod/cli list react @atlaskit/button
62+
```
63+
64+
### Initialize a new codemod package
65+
66+
```bash
67+
npx @hypermod/cli init --transform 1.0.0 my-codemod-package
68+
```
69+
70+
### Validate a codemod package
71+
72+
```bash
73+
npx @hypermod/cli validate ./community/my-package
74+
```
75+
76+
## Learn more
77+
78+
- Product and docs: [hypermod.io/docs](https://www.hypermod.io/docs)
79+
- Explore codemods: [hypermod.io/explore](https://www.hypermod.io/explore)
80+
- Repository: [hypermod-community](https://github.com/hypermod-io/hypermod-community)

packages/initializer/template/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# <% packageName %>
22

3-
This project was bootstrapped with [Hypermod 🚚](https://www.codeshiftcommunity.com/). Please see the [external packages guide](https://www.codeshiftcommunity.com/docs/external-packages) for more information on how to work with this repo.
3+
This project was bootstrapped with [Hypermod 🚚](https://www.hypermod.io/). Please see the [Hypermod docs](https://www.hypermod.io/docs) for more information on how to work with this repo.
44

5-
![Hypermod logo](https://www.codeshiftcommunity.com/img/logo.svg)
5+
![Hypermod logo](https://www.hypermod.io/img/logo.svg)
66

77
## Scripts
88

@@ -14,19 +14,19 @@ Runs the Hypermod CLI useful for testing transform files as if they have been pu
1414

1515
Alternatively, you can run `npm run dev` to see an interactive list of codemods to choose from.
1616

17-
See the [cli reference](https://www.codeshiftcommunity.com/docs/cli) for more information.
17+
See the [CLI docs](https://www.hypermod.io/docs) for more information.
1818

1919
### `npm run test`
2020

2121
Launches the test runner in interactive watch mode.
2222

23-
See the [testing guide](https://www.codeshiftcommunity.com/docs/testing) for more information.
23+
See the [testing guide](https://www.hypermod.io/docs) for more information.
2424

2525
### `npm run validate`
2626

2727
Checks the validity of your `hypermod.config.js` file.
2828

29-
See the [configuration options](https://www.codeshiftcommunity.com/docs/configuration) for more information.
29+
See the [configuration docs](https://www.hypermod.io/docs) for more information.
3030

3131
### `npm run build`
3232

packages/initializer/template/codemods/codemod/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function transformer(
1313
* It is often good practice to exit early and return the original source file
1414
* if it does not contain code relevant to the codemod.
1515
* See this page for more information:
16-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/your-first-codemod#output
16+
* https://www.hypermod.io/docs/guides/your-first-codemod
1717
*/
1818
if (/* Some condition here */ true) {
1919
return file.source;
@@ -26,7 +26,7 @@ export default function transformer(
2626
* consider grouping specific actions into 'motions' and running them in sequence
2727
*
2828
* See this page for more information:
29-
* https://codeshiftcommunity.github.io/CodeshiftCommunity/docs/authoring#motions
29+
* https://www.hypermod.io/docs
3030
*/
3131
source.findVariableDeclarators('foo').renameTo('bar');
3232

0 commit comments

Comments
 (0)