Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 2, 2025
1 parent b151a90 commit 58de67b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules/
.DS_Store
react-markdown.min.js
yarn.lock
!/test-types.d.ts
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ export function defaultUrlTransform(value) {

if (
// If there is no protocol, it’s relative.
colon < 0 ||
colon === -1 ||
// If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
(slash > -1 && colon > slash) ||
(questionMark > -1 && colon > questionMark) ||
(numberSign > -1 && colon > numberSign) ||
(slash !== -1 && colon > slash) ||
(questionMark !== -1 && colon > questionMark) ||
(numberSign !== -1 && colon > numberSign) ||
// It is a protocol, it should be allowed.
safeProtocol.test(value.slice(0, colon))
) {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,22 @@
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"c8": "^10.0.0",
"esbuild": "^0.24.0",
"eslint-plugin-react": "^7.0.0",
"prettier": "^3.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"rehype-raw": "^7.0.0",
"remark-cli": "^12.0.0",
"remark-gfm": "^4.0.0",
"remark-preset-wooorm": "^10.0.0",
"remark-toc": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.59.0"
"xo": "^0.60.0"
},
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
Expand Down
9 changes: 9 additions & 0 deletions test-types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {JSX as Jsx} from 'react/jsx-runtime'

declare global {
namespace JSX {
type ElementClass = Jsx.ElementClass
type Element = Jsx.Element
type IntrinsicElements = Jsx.IntrinsicElements
}
}
2 changes: 2 additions & 0 deletions test-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See `test-types.d.ts`.
export {}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"target": "es2022"
},
"exclude": ["coverage/", "node_modules/"],
"include": ["**/*.js", "**/*.jsx", "lib/complex-types.d.ts"]
"include": ["**/*.js", "**/*.jsx", "test-types.d.ts"]
}

0 comments on commit 58de67b

Please sign in to comment.