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 Sep 6, 2023
1 parent d1175c0 commit e719bf4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions packages/retext-dutch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/retext-english/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/retext-latin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/retext-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/retext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js"
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ while (++index < parsers.length) {

/** @param {string} name */
async function eachParser(name) {
await test('retext-' + name, async function (t) {
const fp = './packages/retext-' + name + '/index.js'
const id = 'retext-' + name

await test(id, async function (t) {
/** @type {{default: import('unified').Plugin<[], string, Root>}} */
// type-coverage:ignore-next-line
const mod = await import(fp)
const mod = await import(id)

await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(mod).sort(), ['default'])
Expand Down

0 comments on commit e719bf4

Please sign in to comment.