Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten the path of the "private" isolated-hoist-non-react-statics-do-not-use-this-in-your-code #2551

Merged
merged 1 commit into from
Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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