Skip to content

Commit

Permalink
chore: remove lerna (#196)
Browse files Browse the repository at this point in the history
* chore: remove lerna

* chore: remove --dry-run
  • Loading branch information
jonas-jonas committed Oct 16, 2024
1 parent e315b58 commit bd51035
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 37 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0"
token: ${{ secrets.ORY_BOT_PAT }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm run initialize
- run: npm ci
- run: npm run build:clean
- run: git checkout main
- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_AENEASR }}" > ~/.npmrc
- run: make format
Expand All @@ -32,4 +31,4 @@ jobs:
return isPrerelease ? 'next' : 'latest';
result-encoding: string
- run: |
npx lerna publish -y ${{ github.event.release.tag_name }} --dist-tag="${{ steps.compute-dist-tag.outputs.result }}" --message 'chore(release): bump version to %s' --no-git-tag-version
npx nx release publish --specifier=${{ github.event.release.tag_name }} --tag="${{ steps.compute-dist-tag.outputs.result }}" --git-commit-message 'chore(release): bump version to ${{ github.event.release.tag_name }}' --git-tag=false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PATH := .bin:${PATH}

.PHONY: install
install:
npm run initialize && npm run build:clean
npm install

test:
npm run test
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Clone this repository and set up the React example.

```shell
git clone [email protected]:ory/elements
npm run initialize
npm install
npm run build:clean
cd examples/react-spa
export VITE_ORY_SDK_URL=http://localhost:4000
Expand Down Expand Up @@ -263,7 +263,7 @@ Explore the Ory Elements via [Storybook](https://storybook.js.org/)!
Clone this repository and run:

```shell
npm run initialize
npm run install
npm run build
# or `npm run build:clean` to ensure no packages have cached versions
npm run storybook
Expand All @@ -282,7 +282,7 @@ E2E and component tests are written in [Playwright](https://playwright.dev/).
**Example Apps**

To contribute an example application, please add it to the `examples/` folder.
To ensure the example works correctly within the Lerna build system, add the
To ensure the example works correctly within the workspace build system, add the
`elements` package to the example `package.json` with an asterisk `*` as the
version.

Expand Down Expand Up @@ -310,12 +310,10 @@ Elements loads the default translations.

### Bundling System

Ory Elements uses [Lerna](https://lerna.js.org/) to bundle each package in the
Ory Elements mono-repository. This also helps with package management and build
caching. Lerna also publishes the code to the public
[npm registry](https://www.npmjs.com/) for us.
Ory Elements uses [nx](https://nx.dev/) to bundle each package in the Ory
Elements mono-repository.

Lerna also use [Nx](https://nx.dev/) to build the packages in parallel.
Nx publishes the code to the public [npm registry](https://www.npmjs.com/).

### Strongly typed CSS using Vanilla-Extract

Expand Down
1 change: 0 additions & 1 deletion examples/preact-spa/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
Expand Down
1 change: 0 additions & 1 deletion examples/react-spa/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
Expand Down
10 changes: 0 additions & 10 deletions lerna.json

This file was deleted.

15 changes: 5 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@
"private": "true",
"scripts": {
"storybook": "storybook dev -p 6006",
"initialize": "npm run clean && npx lerna bootstrap --hoist",
"clean": "npx lerna clean --yes",
"build-storybook": "storybook build",
"refresh": "lerna bootstrap --hoist",
"build:clean": "lerna run build --skip-nx-cache",
"build:clean": "nx run-many --target=build --all --skip-nx-cache",
"build": "nx run-many --target=build --all",
"build:react": "lerna run build --stream --scope=@ory/elements --skip-nx-cache",
"build:preact": "lerna run build --stream --scope=@ory/elements-preact --skip-nx-cache",
"build:markup": "lerna run build --stream --scope=@ory/elements-markup --skip-nx-cache",
"build:test": "lerna run build --stream --scope=@ory/elements-test --skip-nx-cache",
"build:elementsv1": "lerna run build --stream --scope=@ory/elements-react --skip-nx-cache",
"build:react": "nx run @ory/elements:build --skip-nx-cache",
"build:preact": "nx run @ory/elements-preact:build --skip-nx-cache",
"build:markup": "nx run @ory/elements-markup:build --skip-nx-cache",
"build:test": "nx run @ory/elements-test:build --skip-nx-cache",
"test": "jest; playwright test -c playwright-ct.config.ts",
"docs": "typedoc --entryPointStrategy packages . --out docs",
"generate-locales": "cd scripts && npm run generate-locales"
Expand Down Expand Up @@ -76,7 +72,6 @@
"eslint-plugin-storybook": "0.6.14",
"eslint-plugin-tsdoc": "0.2.17",
"jest": "29.7.0",
"lerna": "8.1.7",
"license-checker": "25.0.1",
"nx": "19.5.4",
"ory-prettier-styles": "1.3.0",
Expand Down

0 comments on commit bd51035

Please sign in to comment.