@crackle/router
Advanced tools
Comparing version 0.0.0-fix-entrypoints-20221010073322 to 0.0.0-upgrade-deps-20221116055751
@@ -14,3 +14,2 @@ 'use strict'; | ||
} | ||
return () => input; | ||
@@ -17,0 +16,0 @@ }; |
@@ -14,3 +14,2 @@ 'use strict'; | ||
} | ||
return () => input; | ||
@@ -17,0 +16,0 @@ }; |
@@ -11,3 +11,2 @@ import { Link as Link$1 } from 'react-router-dom'; | ||
} | ||
return () => input; | ||
@@ -14,0 +13,0 @@ }; |
@@ -5,8 +5,8 @@ import type { RouteData } from './types'; | ||
} | ||
declare type RouteDataFunction<T> = (crackleContext: CrackleContext) => RouteData<T>; | ||
declare type RouteDataFunction<T extends Record<string, any>> = (crackleContext: CrackleContext) => RouteData<T>; | ||
interface CreateRouteData { | ||
<T>(routeData: RouteData<T>): RouteDataFunction<T>; | ||
<T>(contextCallback: RouteDataFunction<T>): RouteDataFunction<T>; | ||
<T extends Record<string, any>>(routeData: RouteData<T>): RouteDataFunction<T>; | ||
<T extends Record<string, any>>(contextCallback: RouteDataFunction<T>): RouteDataFunction<T>; | ||
} | ||
export declare const createRouteData: CreateRouteData; | ||
export {}; |
{ | ||
"name": "@crackle/router", | ||
"version": "0.0.0-fix-entrypoints-20221010073322", | ||
"version": "0.0.0-upgrade-deps-20221116055751", | ||
"main": "dist/crackle-router.cjs.js", | ||
@@ -37,8 +37,8 @@ "module": "dist/crackle-router.esm.js", | ||
"dependencies": { | ||
"react": "^17.0.2", | ||
"react-router-dom": "6.0.0-beta.2" | ||
"react": "^18.2.0", | ||
"react-router-dom": "6.4.3" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^17.0.19" | ||
"@types/react": "^18.0.25" | ||
} | ||
} |
@@ -10,11 +10,8 @@ 'use strict'; | ||
const linkDeclarationFilePath = require.resolve('@crackle/router/dist/declarations/src/valid-routes.d.ts'); | ||
const contents = await fs.promises.readFile(linkDeclarationFilePath, 'utf-8'); | ||
const lines = contents.split('\n'); | ||
const validRouteLineIndex = lines.findIndex(line => line.startsWith(routeTypePrefix)); | ||
if (validRouteLineIndex < 0) { | ||
throw new Error('Declaration file not set up correctly'); | ||
} | ||
const validRoutesType = routes.map(route => `'${route}'`).join(' | '); | ||
@@ -21,0 +18,0 @@ lines.splice(validRouteLineIndex, 1, `${routeTypePrefix} = ${validRoutesType};`); |
@@ -10,11 +10,8 @@ 'use strict'; | ||
const linkDeclarationFilePath = require.resolve('@crackle/router/dist/declarations/src/valid-routes.d.ts'); | ||
const contents = await fs.promises.readFile(linkDeclarationFilePath, 'utf-8'); | ||
const lines = contents.split('\n'); | ||
const validRouteLineIndex = lines.findIndex(line => line.startsWith(routeTypePrefix)); | ||
if (validRouteLineIndex < 0) { | ||
throw new Error('Declaration file not set up correctly'); | ||
} | ||
const validRoutesType = routes.map(route => `'${route}'`).join(' | '); | ||
@@ -21,0 +18,0 @@ lines.splice(validRouteLineIndex, 1, `${routeTypePrefix} = ${validRoutesType};`); |
@@ -6,11 +6,8 @@ import { promises } from 'fs'; | ||
const linkDeclarationFilePath = require.resolve('@crackle/router/dist/declarations/src/valid-routes.d.ts'); | ||
const contents = await promises.readFile(linkDeclarationFilePath, 'utf-8'); | ||
const lines = contents.split('\n'); | ||
const validRouteLineIndex = lines.findIndex(line => line.startsWith(routeTypePrefix)); | ||
if (validRouteLineIndex < 0) { | ||
throw new Error('Declaration file not set up correctly'); | ||
} | ||
const validRoutesType = routes.map(route => `'${route}'`).join(' | '); | ||
@@ -17,0 +14,0 @@ lines.splice(validRouteLineIndex, 1, `${routeTypePrefix} = ${validRoutesType};`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8304
+ Added@remix-run/router@1.0.3(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-router@6.4.3(transitive)
+ Addedreact-router-dom@6.4.3(transitive)
- Removed@babel/runtime@7.26.0(transitive)
- Removedhistory@5.3.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)
- Removedreact-router@6.0.0-beta.2(transitive)
- Removedreact-router-dom@6.0.0-beta.2(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updatedreact@^18.2.0
Updatedreact-router-dom@6.4.3