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 Jul 19, 2023
1 parent 877d0b1 commit 3de2f66
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* Handle nodes when leaving (postorder) (optional).
*/

import {color} from './color.js'
import {color} from 'estree-util-visit/do-not-use-color'

const own = {}.hasOwnProperty

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"browser": {
"./lib/color.js": "./lib/color.browser.js"
},
"react-native": {
"./lib/color.js": "./lib/color.browser.js"
"exports": {
".": "./index.js",
"./do-not-use-color": {
"node": "./lib/color.node.js",
"default": "./lib/color.default.js"
}
},
"files": [
"lib/",
Expand Down Expand Up @@ -90,6 +89,7 @@
"prettier": true,
"rules": {
"max-depth": "off",
"n/file-extension-in-import": "off",
"unicorn/prefer-at": "off"
}
}
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import {parse} from 'acorn'
import {EXIT, SKIP, visit} from './index.js'
import {EXIT, SKIP, visit} from 'estree-util-visit'

test('visit', async function (t) {
/** @type {Program} */
Expand Down Expand Up @@ -60,7 +60,7 @@ test('visit', 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('estree-util-visit')).sort(), [
'CONTINUE',
'EXIT',
'SKIP',
Expand Down

0 comments on commit 3de2f66

Please sign in to comment.