Skip to content

Commit

Permalink
fix: compatible esm/mjs requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 16, 2021
1 parent c8944a5 commit 8469b01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -11,7 +11,8 @@
"prepack": "npm run build",
"start": "node lib/index.js",
"watch": "tsbb watch --disable-babel",
"build": "tsbb build --disable-babel",
"build": "tsbb build --disable-babel && npm run esm-fix",
"esm-fix": "tsc-esm-fix --target='lib' --ext='.js'",
"test": "tsbb test",
"coverage": "tsbb test --coverage"
},
Expand Down Expand Up @@ -55,6 +56,7 @@
"remark-gfm": "2.0.0",
"remark-parse": "10.0.0",
"remark-rehype": "9.0.0",
"tsc-esm-fix": "2.7.2",
"tsbb": "3.2.1"
}
}
4 changes: 2 additions & 2 deletions src/index.ts
@@ -1,7 +1,7 @@
import { Plugin, Transformer } from 'unified';
import { Parent, NodeData, Node } from 'unist';
import visit from './visit.js';
import { propertiesHandle, nextChild, prevChild, getCommentObject } from './utils.js';
import visit from './visit';
import { propertiesHandle, nextChild, prevChild, getCommentObject } from './utils';

export type RehypeAttrsOptions = {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
@@ -1,5 +1,5 @@
import { Parent, NodeData } from 'unist';
import { RehypeAttrsOptions } from './index.js';
import { RehypeAttrsOptions } from './';

export const getURLParameters = (url: string): Record<string, string | number | boolean> =>
(url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(
Expand Down

0 comments on commit 8469b01

Please sign in to comment.