Skip to content

Commit

Permalink
Change to use exports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 22, 2023
1 parent 3b02291 commit ce5d28c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import assert from 'node:assert/strict'
import nodeStream from 'node:stream'
import test from 'node:test'
import {unified} from 'unified'
import {stream} from './index.js'
import {stream} from 'unified-stream'

const proc = unified().use(parse).use(stringify)

test('unified-stream', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['stream'])
assert.deepEqual(Object.keys(await import('unified-stream')).sort(), [
'stream'
])
})

const tr = stream(proc)
Expand Down

0 comments on commit ce5d28c

Please sign in to comment.