From 0a32f8be053d05564e57964e1f7e4bae7532a880 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 14 Jun 2023 16:29:33 +0200 Subject: [PATCH] Change to use `export` map --- package.json | 3 +-- test.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index aea7c11..d19a4c5 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,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 0d7aa0a..389e5e9 100644 --- a/test.js +++ b/test.js @@ -2,13 +2,13 @@ import assert from 'node:assert/strict' import process from 'node:process' import test from 'node:test' import {VFile} from 'vfile' -import {reporterJson} from './index.js' +import {reporterJson} from 'vfile-reporter-json' const cwd = process.cwd() test('reporterJson', async function () { assert.deepEqual( - Object.keys(await import('./index.js')).sort(), + Object.keys(await import('vfile-reporter-json')).sort(), ['default', 'reporterJson'], 'should expose the public api' )