diff --git a/package.json b/package.json index f653adf..d06d7e3 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "lib/", "index.d.ts", diff --git a/test/baseline.js b/test/baseline.js index 58a7db5..173c5d0 100644 --- a/test/baseline.js +++ b/test/baseline.js @@ -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 diff --git a/test/index.js b/test/index.js index 69055a9..4740a05 100644 --- a/test/index.js +++ b/test/index.js @@ -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' ])