Skip to content

Commit

Permalink
fix: PnP compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Dec 28, 2024
1 parent 1777546 commit 19d4669
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 172 deletions.
8 changes: 8 additions & 0 deletions .changeset/itchy-guests-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@data-client/react': patch
---

Fix pnp compatibility

Change import from @data-client/normalizr -> @data-client/core
as `core` is explicit dependency
2 changes: 1 addition & 1 deletion __tests__/UnionSchema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity, schema } from '@data-client/endpoint';
import { Entity, schema } from '@data-client/rest';

export enum SequenceType {
TemporalCatDiff = 'temporal_cat_diff',
Expand Down
24 changes: 24 additions & 0 deletions examples/github-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/github-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
"@anansi/router": "0.10.10",
"@ant-design/icons": "^5.0.0",
"@data-client/graphql": "^0.14.0",
"@data-client/img": "^0.14.15",
"@data-client/react": "^0.14.0",
"@data-client/rest": "^0.14.0",
"@js-temporal/polyfill": "^0.4.4",
"antd": "5.22.7",
"history": "^5.3.0",
"parse-link-header": "^2.0.0",
"react": "19.0.0",
"react-dom": "19.0.0",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
"@babel/preset-flow": "^7.18.6",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.26.1",
"@data-client/react": "workspace:^",
"@data-client/test": "workspace:^",
"@data-client/react": "workspace:*",
"@data-client/rest": "workspace:*",
"@data-client/test": "workspace:*",
"@js-temporal/polyfill": "^0.4.4",
"@react-navigation/native": "^7.0.0",
"@react-navigation/native-stack": "^7.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/img/src/__tests__/Img.web.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataProvider } from '@data-client/react';
import { getByTestId, render, waitFor } from '@testing-library/react';
import React, { Suspense } from 'react';
import { render, waitFor } from '@testing-library/react';
import { Suspense } from 'react';

import { Img } from '..';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"build:js:node": "BROWSERSLIST_ENV=node12 yarn g:rollup",
"build:js:browser": "BROWSERSLIST_ENV=legacy yarn g:rollup",
"build:bundle": "yarn g:runs build:js:\\* && echo '{\"type\":\"commonjs\"}' > dist/package.json",
"build:clean": "yarn g:clean ./index.d.ts",
"build:clean": "yarn g:clean index.d.ts next.d.ts native",
"build:legacy-types": "yarn g:downtypes lib ts3.4",
"build": "run build:lib && run build:legacy:lib && run build:native:lib && run build:bundle",
"dev": "run build:lib -w",
Expand Down
3 changes: 1 addition & 2 deletions packages/react/src/__tests__/integration-endpoint.web.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { schema, Entity } from '@data-client/endpoint';
import { Endpoint } from '@data-client/endpoint';
import { DataProvider } from '@data-client/react';
import { DataProvider as ExternalDataProvider } from '@data-client/react/redux';
import { schema, Entity, Endpoint } from '@data-client/rest';
import {
CoolerArticleResource,
EditorArticleResource,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Endpoint, Entity } from '@data-client/endpoint';
import { CacheProvider } from '@data-client/react';
import { DataProvider as ExternalDataProvider } from '@data-client/react/redux';
import { Endpoint, Entity } from '@data-client/rest';
import { afterEach, jest } from '@jest/globals';
import {
OptimisticArticleResource,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Endpoint } from '@data-client/endpoint';
import { NetworkError } from '@data-client/rest';
import { NetworkError, Endpoint } from '@data-client/rest';
import { render } from '@testing-library/react';
import { ReactElement, StrictMode } from 'react';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/hooks/useCancelling.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EndpointInterface } from '@data-client/normalizr';
import type { EndpointInterface } from '@data-client/core';
import { useMemo, useRef } from 'react';

/**
Expand Down
Loading

0 comments on commit 19d4669

Please sign in to comment.