-
-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leverage TypeScript project references #838
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
coverage/ | ||
node_modules/ | ||
*.d.ts | ||
types/ | ||
*.tsbuildinfo | ||
*.log | ||
.DS_Store | ||
react-markdown.min.js | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export type {ExtraProps} from 'hast-util-to-jsx-runtime' | ||
export { | ||
type AllowElement, | ||
type Components, | ||
type Options, | ||
type UrlTransform, | ||
defaultUrlTransform, | ||
default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be possible to do |
||
} from './index.js' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it’s sad that we can no longer have |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,7 @@ const deprecations = [ | |
* @returns {ReactElement} | ||
* React element. | ||
*/ | ||
export function Markdown(options) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change can be discarded, with the change in |
||
export default function Markdown(options) { | ||
const allowedElements = options.allowedElements | ||
const allowElement = options.allowElement | ||
const children = options.children || '' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,11 +69,13 @@ | |
], | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"exports": { | ||
"types": "./types/exports.d.ts", | ||
"default": "./lib/index.js" | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it correct that the |
||
"files": [ | ||
"lib/", | ||
"index.d.ts", | ||
"index.js" | ||
"types/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does the generated folder structure look like? |
||
], | ||
"dependencies": { | ||
"@types/hast": "^3.0.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"checkJs": true, | ||
"customConditions": ["development"], | ||
"exactOptionalPropertyTypes": true, | ||
"module": "node16", | ||
"strict": true, | ||
"target": "es2022" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"lib": ["dom", "es2022"], | ||
"outDir": "types/", | ||
"rootDir": "lib/", | ||
"target": "es2022", | ||
"types": [] | ||
}, | ||
"include": ["lib/"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"checkJs": true, | ||
"customConditions": ["development"], | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"exactOptionalPropertyTypes": true, | ||
"jsx": "preserve", | ||
"lib": ["dom", "es2022"], | ||
"module": "node16", | ||
"strict": true, | ||
"target": "es2022" | ||
"lib": ["es2022"], | ||
"noEmit": true, | ||
"types": ["node"] | ||
}, | ||
"exclude": ["coverage/", "node_modules/"], | ||
"include": ["**/*.js", "**/*.jsx", "lib/complex-types.d.ts"] | ||
"exclude": ["coverage/", "lib/", "node_modules/"], | ||
"references": [{"path": "./tsconfig.build.json"}] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.