Skip to content

Commit

Permalink
chore(deps): update dependency @sanity/pkg-utils to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Mar 16, 2024
1 parent 4e18016 commit 608f5dd
Show file tree
Hide file tree
Showing 26 changed files with 221 additions and 1,258 deletions.
1 change: 1 addition & 0 deletions .github/workflows/format-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
body: I ran `pnpm format` 🧑‍💻
branch: actions/format
commit-message: 'chore(format): 🤖 ✨'
delete-branch: true
labels: 🤖 bot
title: 'chore(format): 🤖 ✨'
token: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Sanity.io <hello@sanity.io>
Copyright (c) 2024 Sanity.io <hello@sanity.io>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion demo/components/AnnotatedMap.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'leaflet/dist/leaflet.css'

import {useEffect, useState} from 'react'
import type {ReducedLeafletApi} from './Leaflet'

import {PortableTextTypeComponent} from '../../src'
import type {ReducedLeafletApi} from './Leaflet'

export interface Geopoint {
_type: 'geopoint'
Expand Down
3 changes: 2 additions & 1 deletion demo/components/CharacterReference.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Avatar, Box, Flex, Stack, Text, Tooltip} from '@sanity/ui'
import {MouseEventHandler} from 'react'
import {Tooltip, Text, Avatar, Flex, Box, Stack} from '@sanity/ui'

import type {PortableTextMarkComponent} from '../../src'

interface CharacterDefinition {
Expand Down
5 changes: 4 additions & 1 deletion demo/components/Code.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import './Code.css'

import Refractor from 'react-refractor'
import typescript from 'refractor/lang/typescript'
import {PortableTextComponent} from '../../src'

import type {PortableTextComponent} from '../../src'

// Prism auto-highlights, but we only want the API, so we need to set it to manual mode
if (typeof window !== 'undefined') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const prismWindow = window as any
prismWindow.Prism = prismWindow.Prism || {}
prismWindow.Prism.manual = true
Expand Down
5 changes: 3 additions & 2 deletions demo/components/Leaflet.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {MapContainer, TileLayer, Marker, Popup} from 'react-leaflet'
import L from 'leaflet'
import markerIcon2x from 'leaflet/dist/images/marker-icon-2x.png'
import markerIcon from 'leaflet/dist/images/marker-icon.png'
import markerIcon2x from 'leaflet/dist/images/marker-icon-2x.png'
import markerShadow from 'leaflet/dist/images/marker-shadow.png'
import {MapContainer, Marker, Popup, TileLayer} from 'react-leaflet'

// Yes, this is unfortunately required, and an intentional side-effect :/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (L.Icon.Default.prototype as any)._getIconUrl
L.Icon.Default.mergeOptions({
iconUrl: markerIcon,
Expand Down
1 change: 1 addition & 0 deletions demo/components/SpeechSynthesis.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useCallback} from 'react'

import type {PortableTextMarkComponent} from '../../src'

interface SpeechSynthesisMark {
Expand Down
3 changes: 2 additions & 1 deletion demo/components/TermDefinition.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Popover, Text} from '@sanity/ui'
import {useCallback, useState} from 'react'
import {Text, Popover} from '@sanity/ui'

import type {PortableTextMarkComponent} from '../../src'

interface DefinitionMark {
Expand Down
16 changes: 8 additions & 8 deletions demo/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {studioTheme, ThemeProvider} from '@sanity/ui'
import {StrictMode} from 'react'
import {createRoot} from 'react-dom/client'
import {studioTheme, ThemeProvider} from '@sanity/ui'

import {PortableTextComponents} from '../src'
import {PortableText} from '../src/react-portable-text'
import {blocks} from './fixture'

import {Link} from './components/Link'
import {TermDefinition} from './components/TermDefinition'
import {AnnotatedMap} from './components/AnnotatedMap'
import {CharacterReference} from './components/CharacterReference'
import {hasSpeechApi, SpeechSynthesis} from './components/SpeechSynthesis'
import {Code} from './components/Code'
import {CurrencyAmount} from './components/CurrencyAmount'
import {Link} from './components/Link'
import {LinkableHeader} from './components/LinkableHeader'
import {SchnauzerList} from './components/SchnauzerList'
import {AnnotatedMap} from './components/AnnotatedMap'
import {Code} from './components/Code'
import {hasSpeechApi, SpeechSynthesis} from './components/SpeechSynthesis'
import {TermDefinition} from './components/TermDefinition'
import {blocks} from './fixture'

/**
* Note that these are statically defined (outside the scope of a function),
Expand Down
2 changes: 2 additions & 0 deletions demo/external.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
declare module 'react-refractor' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const Lowlight: any
export default Lowlight
}

declare module 'refractor/lang/typescript' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const lang: any
export default lang
}
Expand Down
1 change: 1 addition & 0 deletions demo/fixture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {PortableTextBlock} from '@portabletext/types'

import type {AnnotatedMapBlock} from './components/AnnotatedMap'
import type {CodeBlock} from './components/Code'

Expand Down
1 change: 1 addition & 0 deletions package.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {defineConfig} from '@sanity/pkg-utils'
import {visualizer} from 'rollup-plugin-visualizer'

import {name, version} from './package.json'

export default defineConfig({
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@
".": {
"types": "./dist/index.d.ts",
"source": "./src/index.ts",
"require": "./dist/index.cjs",
"node": {
"module": "./dist/index.js",
"import": "./dist/index.cjs.js"
},
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
Expand Down Expand Up @@ -65,6 +61,7 @@
"prettier --write --cache --ignore-unknown"
]
},
"browserslist": "extends @sanity/browserslist-config",
"prettier": {
"bracketSpacing": false,
"plugins": [
Expand All @@ -88,6 +85,9 @@
"sanity/typescript",
"prettier"
],
"rules": {
"react/prop-types": "off"
},
"ignorePatterns": [
"dist/**/"
]
Expand All @@ -100,7 +100,7 @@
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@commitlint/cli": "^19.2.0",
"@commitlint/config-conventional": "^19.1.0",
"@sanity/pkg-utils": "^3.3.8",
"@sanity/pkg-utils": "^5.0.2",
"@sanity/ui": "^2.0.10",
"@types/leaflet": "^1.9.8",
"@types/react": "^18.2.66",
Expand All @@ -118,6 +118,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-config-sanity": "^7.1.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"leaflet": "^1.9.4",
"npm-run-all2": "^5.0.0",
Expand Down
Loading

0 comments on commit 608f5dd

Please sign in to comment.