From a2b0653c90612edb162c75acd145cd7f7f32fae1 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 14 Jun 2023 12:45:20 +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 ec082b6..2140e27 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 d514acf..586acde 100644 --- a/test.js +++ b/test.js @@ -1,11 +1,11 @@ import assert from 'node:assert/strict' import test from 'node:test' import {VFile} from 'vfile' -import {toESLint} from './index.js' +import {toESLint} from 'vfile-to-eslint' test('toESLint', async function () { assert.deepEqual( - Object.keys(await import('./index.js')).sort(), + Object.keys(await import('vfile-to-eslint')).sort(), ['toESLint'], 'should expose the public api' )