profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rexxars/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Espen Hovlandsdal rexxars @sanity-io San Francisco / Oslo https://espen.codes/ Open-source enthusiast and principal engineer at Sanity.io

gatsbyjs/gatsby 50897

Build blazing fast, modern apps and websites with React

remarkjs/react-markdown 7360

Markdown component for React

einaros/sse.js 242

Server-Sent Events made easy for node.js

rexxars/commonmark-react-renderer 126

React renderer for CommonMark (rationalized Markdown)

pwmckenna/node-travis-encrypt 47

node module to encrypt environment variables for travis-ci

movingbrands/svelte-portable-text 25

Svelte component for rendering block content

rexxars/ascii-doge 16

Beautiful ascii doge, as a string or an array

rexxars/byte-range-stream 4

Create a multipart/byteranges stream based on passed ranges

rexxars/aspell-stream 3

Readable and writable stream that spell checks your text and parses aspell output to an understandable format

christeredvartsen/imbo 1

Imbo (Image box) is an image "server" that can be used to add/get/delete images using a RESTful interface.

push eventgeoffreyjball/sanity

Espen Hovlandsdal

commit sha 82049fcfa9b1506152f1bd8f6fac48000a321def

fix(base): only resolve enum value title if using default prepare

view details

push time in 2 days

PullRequestReviewEvent

delete branch sanity-io/sanity

delete branch : fix/json-loading

delete time in 2 days

push eventsanity-io/sanity

Espen Hovlandsdal

commit sha 77f036eacd139b81df10aca3e0dcb45a8a3b2927

fix(server): prevent json imports from passing through babel (#2634) Fixes #2494

view details

push time in 2 days

issue closedsanity-io/sanity

Missing semicolon error when trying to import JSON file

Bug

  • Created a sanity plugin
  • Trying to load json file import data from "./data/raids.json"

Syntax error: Missing semicolon.

It looks like json-loader should be handling this correctly. Has anyone ran into this issue before?

Expected behavior

Load JSON file correctly

closed time in 2 days

lbucio

PR merged sanity-io/sanity

Reviewers
fix(server): prevent json imports from passing through babel

Description

An unconstrained regex in our webpack config is leading to any files containing .js, .jsx, .ts and .tsx to be passed through the babel loader. This is a problem when loading .json files, as they match the regex.

This PR makes sure we only run files ending with these extensions through babel.

Fixes #2494

What to review

  • import data from './data.json' will fail currently but will work with this fix.
  • Check that the regex makes sense (the ? matcher is because of module loaders having the ability to append query string options)

Notes for release

  • Fixes issue where importing JSON files would crash the studio build process
+1 -1

1 comment

1 changed file

rexxars

pr closed time in 2 days

delete branch sanity-io/sanity

delete branch : fix/list-option-previews

delete time in 2 days

push eventgeoffreyjball/sanity

Espen Hovlandsdal

commit sha b2b5405a336e99829762eab988e27558328d13f1

chore(examples): add example of enum value title lookup in preview prepare

view details

Espen Hovlandsdal

commit sha b876e88df50ca87f08902ff6623436802e458a3b

fix(base): only resolve enum value title if using default prepare

view details

push time in 2 days

create barnchsanity-io/sanity

branch : fix/list-option-previews

created branch time in 2 days

PR opened sanity-io/sanity

Reviewers
fix(server): prevent json imports from passing through babel

Description

An unconstrained regex in our webpack config is leading to any files containing .js, .jsx, .ts and .tsx to be passed through the babel loader. This is a problem when loading .json files, as they match the regex.

This PR makes sure we only run files ending with these extensions through babel.

What to review

  • import data from './data.json' will fail currently but will work with this fix.
  • Check that the regex makes sense (the ? matcher is because of module loaders having the ability to append query string options)

Notes for release

  • Fixes issue where importing JSON files would crash the studio build process
+1 -1

0 comment

1 changed file

pr created time in 2 days

push eventsanity-io/sanity

Espen Hovlandsdal

commit sha 2e810e8e10e3dd4acc6ac8f52ce6917a17756f9d

fix(server): prevent json imports from passing through babel Fixes #2494

view details

push time in 2 days

create barnchsanity-io/sanity

branch : fix/json-loading

created branch time in 2 days

delete branch rexxars/gatsby-plugin-sanity-image

delete branch : feat/clientless

delete time in 2 days

PR opened lovell/sharp

Add support for negating only non-alpha channels

This is based on comment by @lovell in https://github.com/lovell/sharp/issues/1035#issuecomment-877003420 - it changes the signature of the negate method to take either a boolean or a plain object with an alpha boolean property. Setting it to false will negate all channels but the alpha, which fixes #1035

+122 -6

0 comment

14 changed files

pr created time in 2 days

push eventrexxars/sharp

Espen Hovlandsdal

commit sha 35bf4072ed327075367cde3f0eb01b1b5b6e6da2

Add support for negating only non-alpha channels Fixes #1035

view details

push time in 2 days

create barnchrexxars/sharp

branch : feat/negate-non-alpha

created branch time in 2 days

Pull request review commentsanity-io/sanity

fix(form-builder): enforce that DateInput value is constrained to timeStep

 function deserialize(isoString: string): ParseResult {   return {isValid: false, error: `Invalid date value: "${isoString}"`} } +// enforceTimeStep takes a dateString and datetime schema options and enforces the time+// to be within the configured timeStep+function enforceTimeStep(dateString: string, options: ParsedOptions) {+  const {timeStep} = options+  if (!timeStep || timeStep === 1) {+    return dateString+  }++  const date = parseISO(dateString)+  const minutes = getMinutes(date)+  const leftOver = minutes % timeStep+  if (leftOver !== 0) {+    return serialize(setMinutes(date, minutes - leftOver))+  }++  return serialize(date)+}+ export const DateTimeInput = React.forwardRef(function DateTimeInput(   props: Props,   forwardedRef: React.ForwardedRef<HTMLInputElement> ) {   const {type, onChange, ...rest} = props   const {title, description, placeholder} = type -  const {dateFormat, timeFormat, timeStep} = parseOptions(type.options)+  const parsedOptions = parseOptions(type.options)+  const {dateFormat, timeFormat, timeStep} = parsedOptions    const handleChange = useCallback(     (nextDate: string | null) => {-      onChange(PatchEvent.from([nextDate === null ? unset() : set(nextDate)]))+      let date = nextDate+      if (date !== null && parsedOptions.timeStep > 1) {+        date = enforceTimeStep(date, parsedOptions)+      }++      onChange(PatchEvent.from([date === null ? unset() : set(date)]))     },-    [onChange]+    [parsedOptions, onChange]

Since parseOptions returns a new object on every invocation, I believe this will make handleChange a new function on every invocation too - maybe we can modify enforceTimeStep to take only the timeStep instead of the entire bag of options? That way this dependency array can depend only on timeStep which is a number and won't change on every invocation.

sgulseth

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

PR opened coreyward/gatsby-plugin-sanity-image

Remove @sanity/client from dependencies

@sanity/image-url only actually needs the project ID and dataset configuration in order to function. By dropping @sanity/client as a dependency, we get a smaller bundle size, faster install and less warnings (currently it'll warn about not specifying an API version). Also updated the image-url module to the latest version.

I didn't have a local installation to test this on, so please give it a go before blindly trusting me not to make any mistakes here ;)

Note: This could be considered a breaking change, as the client was exported from this module - but I didn't find it documented anywhere, and it seemed somewhat odd to me why it would be exported in the first place.

+11 -358

0 comment

5 changed files

pr created time in 3 days

create barnchrexxars/gatsby-plugin-sanity-image

branch : feat/clientless

created branch time in 3 days

fork rexxars/gatsby-plugin-sanity-image

Gatsby plugin providing easy responsive behavior for Sanity-hosted images

fork in 3 days

Pull request review commentsanity-io/sanity

fix(form-builder): enforce that DateInput value is constrained to timeStep

 export const Calendar = forwardRef(function Calendar(     }   }, [ref, focusCurrentWeekDay, focusedDate]) +  useEffect(() => {

Could we add a comment explaining in rough terms what this useEffect call is intended to handle? It's not obvious to me reading the code

sgulseth

comment created time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

startedmswjs/msw

started time in 4 days

push eventsanity-io/sanity

Simeon Griggs

commit sha 0e0b3f89dc2003cf1d344ff1e7fa8affdec990e3

chore(data-aspects): remove todo comment (#2623)

view details

push time in 5 days

delete branch sanity-io/sanity

delete branch : chore/remove-todo-comment

delete time in 5 days

PR merged sanity-io/sanity

remove unwanted TODO comment

Description

Removes unwanted todo comment from in code

What to review

Removal of comment

Notes for release

None

+0 -2

1 comment

1 changed file

SimeonGriggs

pr closed time in 5 days

PullRequestReviewEvent