Skip to content

Commit

Permalink
Shorten the path of the "private" `isolated-hoist-non-react-statics-d…
Browse files Browse the repository at this point in the history
…o-not-use-this-in-your-code` (#2551)
  • Loading branch information
Andarist authored Nov 14, 2021
1 parent 9861a18 commit 99fcea0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-schools-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@emotion/react': patch
---

Shorten the path of the "private" `isolated-hoist-non-react-statics-do-not-use-this-in-your-code` entrypoint to avoid exeeding path limitations on Windows.
13 changes: 13 additions & 0 deletions packages/react/_isolated-hnrs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"main": "dist/emotion-react-_isolated-hnrs.cjs.js",
"module": "dist/emotion-react-_isolated-hnrs.esm.js",
"umd:main": "dist/emotion-react-_isolated-hnrs.umd.min.js",
"browser": {
"./dist/emotion-react-_isolated-hnrs.cjs.js": "./dist/emotion-react-_isolated-hnrs.browser.cjs.js",
"./dist/emotion-react-_isolated-hnrs.esm.js": "./dist/emotion-react-_isolated-hnrs.browser.esm.js"
},
"sideEffects": false,
"preconstruct": {
"umdName": "emotionHoistNonReactStatics"
}
}

This file was deleted.

4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dist",
"jsx-runtime",
"jsx-dev-runtime",
"isolated-hoist-non-react-statics-do-not-use-this-in-your-code",
"_isolated-hnrs",
"types/*.d.ts",
"macro.js",
"macro.d.ts",
Expand Down Expand Up @@ -68,7 +68,7 @@
"./index.js",
"./jsx-runtime.js",
"./jsx-dev-runtime.js",
"./isolated-hoist-non-react-statics-do-not-use-this-in-your-code.js"
"./_isolated-hnrs.js"
],
"umdName": "emotionReact"
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/react/src/theming.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import weakMemoize from '@emotion/weak-memoize'
import hoistNonReactStatics from './isolated-hoist-non-react-statics-do-not-use-this-in-your-code'
import hoistNonReactStatics from './_isolated-hnrs'

export const ThemeContext = /* #__PURE__ */ React.createContext<Object>({})
if (process.env.NODE_ENV !== 'production') {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @flow
export let isBrowser = typeof document !== 'undefined'

export const hasOwnProperty = Object.prototype.hasOwnProperty
export const hasOwnProperty = {}.hasOwnProperty

0 comments on commit 99fcea0

Please sign in to comment.