From 798ca2a31056e7756812c1f64599643b89d55fea Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 5 Jul 2023 21:58:14 +0200 Subject: [PATCH] Change to use `export` map --- package.json | 3 +-- test.js | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 67796af..70e010c 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.js b/test.js index 2fee133..17766b2 100644 --- a/test.js +++ b/test.js @@ -1,16 +1,17 @@ /** - * @typedef {import('mdast').Content} Content * @typedef {import('mdast').Root} Root */ import assert from 'node:assert/strict' import test from 'node:test' import {u} from 'unist-builder' -import {map} from './index.js' +import {map} from 'unist-util-map' test('map', async function (t) { await t.test('should expose the public api', async function () { - assert.deepEqual(Object.keys(await import('./index.js')).sort(), ['map']) + assert.deepEqual(Object.keys(await import('unist-util-map')).sort(), [ + 'map' + ]) }) await t.test('should map the specified node', async function () {