-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from timlrx/update-contentlayer
Update contentlayer and other dependencies
- Loading branch information
Showing
8 changed files
with
2,075 additions
and
1,477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'pliny': patch | ||
--- | ||
|
||
Add liClassName prop for TOCInline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'pliny': minor | ||
--- | ||
|
||
update dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'pliny': patch | ||
--- | ||
|
||
Add microsoft clarity analytics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
import fs from 'fs' | ||
import globby from 'globby' | ||
|
||
// Append "use client" to all path chunks that contain "use" hooks | ||
// So these packages can be directly used in Next.js directly | ||
// This allows us to see support file splitting with easy next import | ||
;(async () => { | ||
console.log('Added use client directive to the following files:') | ||
const chunkPaths = await globby('chunk*') | ||
for (const path of chunkPaths) { | ||
const data = fs.readFileSync(path, 'utf8') | ||
if ( | ||
/useState|useEffect|useRef|useCallback|useContext|useMemo|useTheme|useRouter|useRegisterActions|useMatches|useKBar/.test( | ||
data | ||
) | ||
) { | ||
// Append "use client" to all path chunks that contain "use" hooks | ||
// So these packages can be directly used in Next.js directly | ||
// This allows us to see support file splitting with easy next import | ||
; (async () => { | ||
console.log('Added use client directive to the following files:') | ||
const chunkPaths = await globby('chunk*') | ||
for (const path of chunkPaths) { | ||
const data = fs.readFileSync(path, 'utf8') | ||
if ( | ||
/useState|useEffect|useRef|useCallback|useContext|useMemo|useTheme|useRouter|useRegisterActions|useMatches|useKBar/.test( | ||
data | ||
) | ||
) { | ||
console.log(path) | ||
const insert = Buffer.from('"use client"\n') | ||
fs.writeFileSync(path, insert + data) | ||
} | ||
} | ||
// Handle ui differently as they are not split | ||
const clientPaths = await globby([ | ||
'ui/NewsletterForm.js', | ||
'ui/BlogNewsletterForm.js', | ||
'ui/Pre.js', | ||
'search/KBarButton.js', | ||
'search/AlgoliaButton.js', | ||
]) | ||
for (const path of clientPaths) { | ||
console.log(path) | ||
const data = fs.readFileSync(path) | ||
const insert = Buffer.from('"use client"\n') | ||
fs.writeFileSync(path, insert + data) | ||
} | ||
} | ||
// Handle ui differently as they are not split | ||
const clientPaths = await globby([ | ||
'ui/NewsletterForm.js', | ||
'ui/BlogNewsletterForm.js', | ||
'ui/Pre.js', | ||
'search/KBarButton.js', | ||
'search/AlgoliaButton.js', | ||
]) | ||
for (const path of clientPaths) { | ||
console.log(path) | ||
const data = fs.readFileSync(path) | ||
const insert = Buffer.from('"use client"\n') | ||
fs.writeFileSync(path, insert + data) | ||
} | ||
})() | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,18 +25,18 @@ | |
"author": "Timothy Lin <[email protected]> (https://timlrx.com)", | ||
"dependencies": { | ||
"@docsearch/react": "^3.5.0", | ||
"@giscus/react": "^2.3.0", | ||
"@giscus/react": "^3.0.0", | ||
"@mailchimp/mailchimp_marketing": "^3.0.80", | ||
"contentlayer": "^0.3.4", | ||
"contentlayer2": "^0.4.4", | ||
"copyfiles": "^2.4.1", | ||
"github-slugger": "^2.0.0", | ||
"js-yaml": "4.1.0", | ||
"kbar": "0.1.0-beta.45", | ||
"next-contentlayer": "^0.3.4", | ||
"next-themes": "^0.2.1", | ||
"next-contentlayer2": "^0.4.4", | ||
"next-themes": "^0.3.0", | ||
"probe-image-size": "^7.2.3", | ||
"remark": "^14.0.2", | ||
"unist-util-visit": "^4.1.0" | ||
"remark": "^15.0.0", | ||
"unist-util-visit": "^5.0.0" | ||
}, | ||
"peerDependencies": { | ||
"next": ">=13.0.0", | ||
|
@@ -45,11 +45,11 @@ | |
}, | ||
"devDependencies": { | ||
"@types/copyfiles": "^2", | ||
"next": "13.4.10", | ||
"next": "14.1.4", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"rimraf": "^3.0.2", | ||
"tsup": "7.1.0", | ||
"tsup": "8.0.2", | ||
"typescript": "^5.1.6" | ||
}, | ||
"lint-staged": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.