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 3, 2023
1 parent 98d7534 commit a139abd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion test/baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import fs from 'node:fs/promises'
import {ariaAttributes} from 'aria-attributes'
import {h} from 'hastscript'
import {fromHtml} from 'hast-util-from-html'
import {defaultSchema} from 'hast-util-sanitize'
import {toHtml} from 'hast-util-to-html'
import {htmlElementAttributes} from 'html-element-attributes'
import {htmlTagNames} from 'html-tag-names'
import {visit} from 'unist-util-visit'
import {defaultSchema} from '../index.js'

const schemaAncestors = defaultSchema.ancestors
const schemaAttributes = defaultSchema.attributes
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import assert from 'node:assert/strict'
import test from 'node:test'
import deepmerge from 'deepmerge'
import {h, s} from 'hastscript'
import {defaultSchema, sanitize} from 'hast-util-sanitize'
import {toHtml} from 'hast-util-to-html'
import {u} from 'unist-builder'
import {defaultSchema, sanitize} from '../index.js'

const own = {}.hasOwnProperty

test('sanitize()', 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('hast-util-sanitize')).sort(), [
'defaultSchema',
'sanitize'
])
Expand Down

0 comments on commit a139abd

Please sign in to comment.