Skip to content

Commit

Permalink
Replace yarn, lerna with npm (#1654)
Browse files Browse the repository at this point in the history
* yarn is having problems hoisting dependencies
* workspaces are built into npm now
* GHA + npm have some fancy caching mechanisms

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>

Related-to: GH-1015.
  • Loading branch information
wooorm committed Sep 14, 2021
1 parent d8b666e commit 952f6dc
Show file tree
Hide file tree
Showing 34 changed files with 85,022 additions and 24,498 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ on:
- push
jobs:
main:
name: '${{matrix.node}} on ${{matrix.os}}'
name: '${{matrix.os}} / ${{matrix.node}}'
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: dcodeIO/setup-node-nvm@master
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- run: npm install -g yarn && yarn --frozen-lockfile
env:
CI: 'true'
- name: Test
run: yarn test
cache: npm
- run: npm install -g npm && npm install
- run: npm test
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node:
- lts/erbium
- node
- '*'
23 changes: 12 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # for lerna
fetch-depth: 0
- uses: dcodeIO/setup-node-nvm@master
- run: npm install -g yarn && yarn --frozen-lockfile
env:
CI: 'true'
- name: Publish CI tag to npm
if: github.ref == 'refs/heads/main'
run: |
npm set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN
yarn publish-ci
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
- run: 'echo "to do: figure out npm"'
# - run: npm install -g yarn && yarn --frozen-lockfile
# env:
# CI: 'true'
# - name: Publish CI tag to npm
# if: github.ref == 'refs/heads/main'
# run: |
# npm set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN
# yarn publish-ci
# env:
# NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
package-lock.json
dist
cache
build
Expand All @@ -11,8 +10,6 @@ build
tmp
artifacts
.*cache
.npmrc
.nyc_output/
coverage/
.yarn
/public
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

6 changes: 3 additions & 3 deletions docs/_component/editor.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {Tab, Tabs, TabList, TabPanel} from 'react-tabs'
import {ErrorBoundary} from 'react-error-boundary'
import {toH} from 'hast-to-hyperscript'
import {lowlight} from 'lowlight/lib/core.js'
import javascript from 'highlight.js/lib/languages/javascript.js'
import json from 'highlight.js/lib/languages/json.js'
import markdown from 'highlight.js/lib/languages/markdown.js'
import javascript from 'highlight.js/lib/languages/javascript'
import json from 'highlight.js/lib/languages/json'
import markdown from 'highlight.js/lib/languages/markdown'

lowlight.registerLanguage('js', javascript)
lowlight.registerLanguage('json', json)
Expand Down
1 change: 0 additions & 1 deletion examples/gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "gatsby-example",
"version": "2.0.0-next.9",
"private": true,
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions examples/gatsby/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```

Alternatively, to build for production and serve the resulting `public/`:

```sh
yarn build
npm run build
npx serve public/
```
1 change: 0 additions & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "next-example",
"version": "2.0.0-next.9",
"private": true,
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions examples/next/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```

Alternatively, to build for production and serve the resulting `build/`:

```sh
yarn build
npm run build
npx serve build/
```
1 change: 0 additions & 1 deletion examples/parcel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "parcel-example",
"version": "2.0.0-next.9",
"private": true,
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions examples/parcel/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```

Alternatively, to build for production and serve the resulting `build/`:

```sh
yarn build
npm run build
npx serve build/
```
1 change: 0 additions & 1 deletion examples/react-web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "react-web-components-example",
"version": "2.0.0-next.9",
"private": true,
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions examples/react-web-components/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```

Alternatively, to build for production and serve the resulting `build/`:

```sh
yarn build
npm run build
npx serve build/
```
3 changes: 1 addition & 2 deletions examples/terminal/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "terminal-example",
"version": "2.0.0-next.9",
"license": "MIT",
"private": true,
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/mdx-js/mdx",
Expand Down
4 changes: 2 additions & 2 deletions examples/terminal/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
Install:

```sh
yarn
npm install
```

Then to run the example:

```sh
yarn start
npm start
```
1 change: 0 additions & 1 deletion examples/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "vue-example",
"version": "2.0.0-next.9",
"private": true,
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions examples/vue/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```

Alternatively, to build for production and serve the resulting `dist/`:

```sh
yarn build
npm run build
npx serve dist/
```
3 changes: 1 addition & 2 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "webpack-example",
"version": "2.0.0-next.9",
"private": true,
"description": "",
"author": "Brent Jackson",
"license": "MIT",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/mdx-js/mdx",
Expand Down
4 changes: 2 additions & 2 deletions examples/webpack/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
Install:

```sh
yarn
npm install
```

Then, to start a development server:

```sh
yarn start
npm start
```
13 changes: 0 additions & 13 deletions lerna.json

This file was deleted.

Loading

1 comment on commit 952f6dc

@vercel
Copy link

@vercel vercel bot commented on 952f6dc Sep 14, 2021

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

Please sign in to comment.