Skip to content

Commit

Permalink
Change to use export map
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 6, 2023
1 parent 77d6cb1 commit b5f36de
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
lib/index.d.ts
test.d.ts
*.d.ts
*.log
coverage/
node_modules/
yarn.lock
!/index.d.ts
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
TableRow
} from 'mdast'
import type {Node, Parent} from 'unist'
import {CONTINUE, EXIT, SKIP, visit} from './index.js'
import {CONTINUE, EXIT, SKIP, visit} from 'unist-util-visit'

// To do: use `mdast` when released.
type Nodes = Root | Content
Expand Down
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down Expand Up @@ -99,6 +98,16 @@
"strict": true
},
"xo": {
"overrides": [
{
"files": [
"**/*.ts"
],
"rules": {
"import/no-extraneous-dependencies": "off"
}
}
],
"prettier": true
}
}
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import test from 'node:test'
import {fromMarkdown} from 'mdast-util-from-markdown'
import {gfmFromMarkdown} from 'mdast-util-gfm'
import {gfm} from 'micromark-extension-gfm'
import {CONTINUE, EXIT, SKIP, visit} from './index.js'
import {CONTINUE, EXIT, SKIP, visit} from 'unist-util-visit'

const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')

Expand Down Expand Up @@ -50,7 +50,7 @@ const reverseTypes = [

test('visit', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
assert.deepEqual(Object.keys(await import('unist-util-visit')).sort(), [
'CONTINUE',
'EXIT',
'SKIP',
Expand Down

0 comments on commit b5f36de

Please sign in to comment.