Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm workspaces #67

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
- uses: dcodeIO/setup-node-nvm@master
with:
node-version: ${{matrix.node}}
- run: npm install -g npm
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v1
Expand Down
3 changes: 0 additions & 3 deletions lerna.json

This file was deleted.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"bail": "^2.0.0",
"c8": "^7.0.0",
"hast-util-assert": "^3.0.0",
"lerna": "^4.0.0",
"mdast-zone": "^5.0.0",
"prettier": "^2.0.0",
"remark-cli": "^10.0.0",
Expand All @@ -30,9 +29,14 @@
"unist-util-remove-position": "^4.0.0",
"xo": "^0.44.0"
},
"workspaces": [
"packages/rehype-parse",
"packages/rehype-stringify",
"packages/rehype",
"packages/rehype-cli"
ChristianMurphy marked this conversation as resolved.
Show resolved Hide resolved
],
"scripts": {
"postinstall": "lerna bootstrap --no-ci",
"build-workspace": "lerna run build",
"build-workspace": "npm run build --workspaces",
"build-monorepo": "rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage",
"build": "npm run build-workspace && npm run build-monorepo",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
Expand Down
8 changes: 4 additions & 4 deletions test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import test from 'tape'
import {readSync} from 'to-vfile'
import {removePosition} from 'unist-util-remove-position'
import {assert} from 'hast-util-assert'
import {unified} from '../packages/rehype/node_modules/unified/index.js'
import rehypeParse from '../packages/rehype-parse/index.js'
import rehypeStringify from '../packages/rehype-stringify/index.js'
import {rehype} from '../packages/rehype/index.js'
import {unified} from 'unified'
import rehypeParse from 'rehype-parse'
import rehypeStringify from 'rehype-stringify'
import {rehype} from 'rehype'
ChristianMurphy marked this conversation as resolved.
Show resolved Hide resolved

const fragment = {fragment: true}

Expand Down
6 changes: 3 additions & 3 deletions test/parse-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import fs from 'node:fs'
import path from 'node:path'
import test from 'tape'
import {toVFile, readSync} from 'to-vfile'
import {rehype} from '../packages/rehype/index.js'
import {rehype} from 'rehype'
// @ts-expect-error: untyped.
import p5errors from '../packages/rehype-parse/node_modules/parse5/lib/common/error-codes.js'
import {errors as rerrors} from '../packages/rehype-parse/lib/errors.js'
import p5errors from 'parse5/lib/common/error-codes.js'
import {errors as rerrors} from 'rehype-parse/lib/errors.js'

// Related to https://github.com/inikulin/parse5/issues/255
// and https://github.com/inikulin/parse5/pull/257.
Expand Down