Skip to content

Commit

Permalink
Merge pull request #838 from timlrx/upgrade/dependencies
Browse files Browse the repository at this point in the history
feat: upgrade next 14.1, tailwind 3.4 and pliny 0.1.7
  • Loading branch information
timlrx authored Jan 28, 2024
2 parents 6c79596 + 2aa4704 commit 2c220fa
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 190 deletions.
4 changes: 2 additions & 2 deletions contentlayer.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineDocumentType, ComputedFields, makeSource } from 'contentlayer/source-files'
import { writeFileSync } from 'fs'
import readingTime from 'reading-time'
import GithubSlugger from 'github-slugger'
import { slug } from 'github-slugger'
import path from 'path'
// Remark packages
import remarkGfm from 'remark-gfm'
Expand Down Expand Up @@ -50,7 +50,7 @@ function createTagCount(allBlogs) {
allBlogs.forEach((file) => {
if (file.tags && (!isProduction || file.draft !== true)) {
file.tags.forEach((tag) => {
const formattedTag = GithubSlugger.slug(tag)
const formattedTag = slug(tag)
if (formattedTag in tagCount) {
tagCount[formattedTag] += 1
} else {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"lint": "next lint --fix --dir pages --dir app --dir components --dir lib --dir layouts --dir scripts"
},
"dependencies": {
"@next/bundle-analyzer": "14.0.3",
"@next/bundle-analyzer": "14.1.0",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.13",
"contentlayer": "0.3.4",
"esbuild": "0.18.11",
"github-slugger": "^1.4.0",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.2",
"image-size": "1.0.0",
"next": "14.0.3",
"next": "14.1.0",
"next-contentlayer": "0.3.4",
"next-themes": "^0.2.1",
"pliny": "0.1.6",
"pliny": "0.1.7",
"postcss": "^8.4.24",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -37,7 +37,7 @@
"remark": "^14.0.2",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"tailwindcss": "^3.3.3",
"tailwindcss": "^3.4.1",
"unist-util-visit": "^4.1.0"
},
"devDependencies": {
Expand All @@ -48,13 +48,13 @@
"@typescript-eslint/parser": "^6.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.45.0",
"eslint-config-next": "14.0.3",
"eslint-config-next": "14.1.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.0",
"lint-staged": "^13.0.0",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.1",
"prettier-plugin-tailwindcss": "^0.5.11",
"typescript": "^5.1.3"
},
"resolutions": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/rss.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writeFileSync, mkdirSync } from 'fs'
import path from 'path'
import GithubSlugger from 'github-slugger'
import { slug } from 'github-slugger'
import { escape } from 'pliny/utils/htmlEscaper.js'
import siteMetadata from '../data/siteMetadata.js'
import tagData from '../app/tag-data.json' assert { type: 'json' }
Expand Down Expand Up @@ -46,7 +46,7 @@ async function generateRSS(config, allBlogs, page = 'feed.xml') {
if (publishPosts.length > 0) {
for (const tag of Object.keys(tagData)) {
const filteredPosts = allBlogs.filter((post) =>
post.tags.map((t) => GithubSlugger.slug(t)).includes(tag)
post.tags.map((t) => slug(t)).includes(tag)
)
const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
const rssPath = path.join('public', 'tags', tag)
Expand Down
Loading

0 comments on commit 2c220fa

Please sign in to comment.