Skip to content
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
2 changes: 1 addition & 1 deletion __tests__/new.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Temporal } from '@js-temporal/polyfill';
import React, { createContext, useContext } from 'react';
import { Temporal } from 'temporal-polyfill';

import {
Endpoint,
Expand Down
4 changes: 2 additions & 2 deletions docs/rest/api/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ We have two nested [entity](./Entity.md) types within our `article`: `users` and

```typescript
import { schema, Entity } from '@data-client/endpoint';
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

class User extends Entity {
id = '';
Expand Down Expand Up @@ -79,7 +79,7 @@ class Article extends Entity {

```javascript
import { schema, Entity } from '@data-client/endpoint';
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

class User extends Entity { }

Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@data-client/img": "0.15.0",
"@data-client/react": "0.15.7",
"@data-client/rest": "0.15.7",
"@js-temporal/polyfill": "^0.5.1",
"temporal-polyfill": "^0.3.0",
"antd": "6.3.3",
"core-js": "^3.48.0",
"history": "^5.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/components/human.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

export function humanTime(date: Temporal.Instant, language: string) {
const REL = new Intl.RelativeTimeFormat(language, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { useNavigator } from '@anansi/core';
import { Link, useRoutes } from '@anansi/router';
import { EllipsisOutlined } from '@ant-design/icons';
import { useCache, useController } from '@data-client/react';
import { Intl } from '@js-temporal/polyfill';
import { css } from '@linaria/core';
import { Card, Avatar, Button, Tag, Popover } from 'antd';
import React, { memo, useCallback, useState } from 'react';
import Markdown from 'react-markdown';
import rehypeHighlight from 'rehype-highlight';
import remarkGfm from 'remark-gfm';
import remarkRemoveComments from 'remark-remove-comments';
import { Intl } from 'temporal-polyfill';

import FlexRow from '@/components/FlexRow';
import { CommentResource, Comment } from '@/resources/Comment';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/pages/ProfileDetail/UserEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useNavigator } from '@anansi/core';
import { Link } from '@anansi/router';
import { BranchesOutlined, PullRequestOutlined } from '@ant-design/icons';
import { useSuspense } from '@data-client/react';
import { Intl } from '@js-temporal/polyfill';
import { Timeline, Typography, Divider } from 'antd';
import { groupBy } from 'lodash';
import { useMemo } from 'react';
import { Intl } from 'temporal-polyfill';

import {
EventResource,
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/pages/ProfileDetail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useNavigator } from '@anansi/core';
import { useSuspense } from '@data-client/react';
import { Intl } from '@js-temporal/polyfill';
import { Card, Layout } from 'antd';
import Markdown from 'react-markdown';
import { Intl } from 'temporal-polyfill';

import { UserResource } from '@/resources/User';

Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Comment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { GithubEntity, githubResource } from './Base';
import { User } from './User';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
ForkOutlined,
} from '@ant-design/icons';
import { schema } from '@data-client/rest';
import { Temporal } from '@js-temporal/polyfill';
import type { JSX } from 'react';
import { Temporal } from 'temporal-polyfill';

import { githubResource, GithubEntity } from './Base';
import { Issue } from './Issue';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Issue.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { GithubEntity, githubResource } from './Base';
import { Label } from './Label';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Pull.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { GithubEntity, githubResource } from './Base';
import { Label } from './Label';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Reaction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HeartOutlined } from '@ant-design/icons';
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { githubResource, GithubEntity } from './Base';
import PreviewEndpoint from './PreviewEndpoint';
Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Repository.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { GithubEntity, githubResource, GithubGqlEndpoint } from './Base';

Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/Review.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { GithubEntity } from './Base';

Expand Down
2 changes: 1 addition & 1 deletion examples/github-app/src/resources/User.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { githubResource, GithubEndpoint, GithubEntity } from './Base';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"@data-client/react": "workspace:*",
"@data-client/rest": "workspace:*",
"@data-client/test": "workspace:*",
"@js-temporal/polyfill": "^0.5.0",
"@react-navigation/native": "^7.0.0",
"@react-navigation/native-stack": "^7.0.0",
"@testing-library/dom": "^10.4.0",
Expand Down Expand Up @@ -103,6 +102,7 @@
"react-test-renderer": "19.2.3",
"rimraf": "^6.0.0",
"rollup": "4.59.0",
"temporal-polyfill": "^0.3.0",
"typescript": "6.0.2",
"whatwg-fetch": "3.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/endpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@
"@anansi/browserslist-config": "^1.4.2",
"@data-client/core": "workspace:*",
"@data-client/normalizr": "workspace:*",
"@js-temporal/polyfill": "^0.5.0",
"@types/jest": "30.0.0",
"@types/node": "^24.0.0",
"immutable": "5.1.5",
"nock": "13.3.1",
"rollup-plugins": "workspace:*"
"rollup-plugins": "workspace:*",
"temporal-polyfill": "^0.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/endpoint/src/__tests__/validateRequired.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-env jest
import { jest, describe, beforeAll, afterAll, it, expect } from '@jest/globals';
import { Temporal } from '@js-temporal/polyfill';
import { IDEntity } from '__tests__/new';
import { Temporal } from 'temporal-polyfill';

import SimpleMemoCache from '../schemas/__tests__/denormalize';
import Entity from '../schemas/Entity';
Expand Down
2 changes: 1 addition & 1 deletion packages/endpoint/src/schemas/__tests__/Entity.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { normalize, INVALID } from '@data-client/normalizr';
import { denormalize as plainDenormalize } from '@data-client/normalizr';
import { denormalize as immDenormalize } from '@data-client/normalizr/imm';
import { Temporal } from '@js-temporal/polyfill';
import { IDEntity } from '__tests__/new';
import { Temporal } from 'temporal-polyfill';

import { SimpleMemoCache, fromJSEntities } from './denormalize';
import { AbstractInstanceType } from '../../';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { normalize, INVALID } from '@data-client/normalizr';
import { denormalize as plainDenormalize } from '@data-client/normalizr';
import { denormalize as immDenormalize } from '@data-client/normalizr/imm';
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { SimpleMemoCache, fromJSEntities } from './denormalize';
import { schema, EntityMixin, Values } from '../..';
Expand Down
2 changes: 1 addition & 1 deletion packages/endpoint/src/schemas/__tests__/Object.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
denormalize as plainDenormalize,
} from '@data-client/normalizr';
import { denormalize as immDenormalize } from '@data-client/normalizr/imm';
import { Temporal } from '@js-temporal/polyfill';
import { IDEntity } from '__tests__/new';
import { fromJS } from 'immutable';
import { Temporal } from 'temporal-polyfill';

import { fromJSEntities } from './denormalize';
import { schema } from '../../';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-env jest
import { normalize } from '@data-client/normalizr';
import { Temporal } from '@js-temporal/polyfill';
import { IDEntity } from '__tests__/new';
import { Temporal } from 'temporal-polyfill';

import SimpleMemoCache from './denormalize';

Expand Down
2 changes: 1 addition & 1 deletion packages/normalizr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ We have two [nested](https://dataclient.io/rest/guides/relational-data) [entity]

```js
import { schema, Entity } from '@data-client/endpoint';
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

// Define a users schema
class User extends Entity {}
Expand Down
4 changes: 2 additions & 2 deletions packages/normalizr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
"devDependencies": {
"@anansi/browserslist-config": "^1.4.2",
"@data-client/endpoint": "workspace:*",
"@js-temporal/polyfill": "^0.5.0",
"@types/jest": "30.0.0",
"@types/node": "^24.0.0",
"immutable": "5.1.5",
"rollup-plugins": "workspace:*"
"rollup-plugins": "workspace:*",
"temporal-polyfill": "^0.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/normalizr/src/__tests__/WeakDependencyMap.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

import { EntityPath } from '../interface';
import { MemoPolicy } from '../memo/Policy';
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
"@data-client/rest": "workspace:*",
"@data-client/test": "workspace:*",
"@jest/globals": "^30.0.0",
"@js-temporal/polyfill": "^0.5.0",
"@react-navigation/native": "^7.0.0",
"@react-navigation/native-stack": "^7.2.0",
"@testing-library/dom": "^10.4.0",
Expand All @@ -220,6 +219,7 @@
"react-native-safe-area-context": "^5.0.0",
"react-native-screens": "^4.1.0",
"react-test-renderer": "^19.0.0",
"rollup-plugins": "workspace:*"
"rollup-plugins": "workspace:*",
"temporal-polyfill": "^0.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/react/src/__tests__/useFetch-use.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Collection, Values } from '@data-client/endpoint';
import { normalize } from '@data-client/normalizr';
import { DataProvider } from '@data-client/react';
import { jest } from '@jest/globals';
import { Temporal } from '@js-temporal/polyfill';
import { render } from '@testing-library/react';
import {
CoolerArticleResource,
Expand All @@ -32,6 +31,7 @@ import { createEntityMeta } from '__tests__/utils';
import nock from 'nock';
import { use } from 'react';
import React, { Suspense } from 'react';
import { Temporal } from 'temporal-polyfill';

// relative imports to avoid circular dependency in tsconfig references
import { useController, ControllerContext, StateContext } from '..';
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/hooks/__tests__/useSuspense.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
MockResolver,
} from '@data-client/test';
import { jest } from '@jest/globals';
import { Temporal } from '@js-temporal/polyfill';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { render, act, screen } from '@testing-library/react-native';
Expand All @@ -38,6 +37,7 @@ import nock from 'nock';
import React, { Suspense } from 'react';
import { Text, View } from 'react-native';
import { InteractionManager } from 'react-native';
import { Temporal } from 'temporal-polyfill';

// relative imports to avoid circular dependency in tsconfig references
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/hooks/__tests__/useSuspense.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from '@data-client/endpoint';
import { normalize } from '@data-client/normalizr';
import { jest } from '@jest/globals';
import { Temporal } from '@js-temporal/polyfill';
import { render } from '@testing-library/react';
import {
CoolerArticleResource,
Expand All @@ -37,6 +36,7 @@ import {
import { createEntityMeta } from '__tests__/utils';
import nock from 'nock';
import React, { Suspense } from 'react';
import { Temporal } from 'temporal-polyfill';

// relative imports to avoid circular dependency in tsconfig references
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@
"@anansi/browserslist-config": "^1.4.2",
"@data-client/rest": "workspace:*",
"@jest/globals": "^30.0.0",
"@js-temporal/polyfill": "^0.5.0",
"@types/jest": "30.0.0",
"@types/node": "^24.0.0",
"@vue/test-utils": "^2.4.0",
"jest-environment-jsdom": "^30.0.0",
"jest-mock": "^30.0.0",
"nock": "13.3.1",
"rollup-plugins": "workspace:*",
"temporal-polyfill": "^0.3.0",
"vue": "^3.4.0"
}
}
2 changes: 1 addition & 1 deletion scripts/copywebsitetypes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cp ./packages/react/nextjs.d.ts ./website/src/components/Playground/editor-types
cp ./packages/react/ssr.d.ts ./website/src/components/Playground/editor-types/@data-client/react/ssr.d.ts
cp ./packages/react/redux.d.ts ./website/src/components/Playground/editor-types/@data-client/react/redux.d.ts
cp ./node_modules/@types/react/index.d.ts ./website/src/components/Playground/editor-types/react.d.ts
cp ./node_modules/@js-temporal/polyfill/index.d.ts ./website/src/components/Playground/editor-types/temporal.d.ts
cp ./node_modules/temporal-spec/index.d.ts ./website/src/components/Playground/editor-types/temporal.d.ts
cp ./node_modules/bignumber.js/bignumber.d.ts ./website/src/components/Playground/editor-types/bignumber.d.ts
cp ./node_modules/@types/qs/index.d.ts ./website/src/components/Playground/editor-types/qs.d.ts
yarn run rollup --config ./scripts/rollup-plugins/uuid-types.rollup.config.js
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2024-01-15-v0.9-release-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class MyEntity extends Entity {
Alternatively, use Temporal:

```ts
import { Temporal } from '@js-temporal/polyfill';
import { Temporal } from 'temporal-polyfill';

class MyEntity extends Entity {
createdAt = Temporal.Instant.fromEpochSeconds(0);
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@docusaurus/preset-classic": "^3.0.1",
"@docusaurus/theme-live-codeblock": "^3.0.1",
"@docusaurus/theme-mermaid": "^3.0.1",
"@js-temporal/polyfill": "^0.5.0",
"@mdx-js/react": "^3.1.0",
"@monaco-editor/react": "^4.8.0-rc.0",
"@number-flow/react": "^0.6.0",
Expand All @@ -56,6 +55,7 @@
"react-dom": "^19.0.0",
"react-json-tree": "0.20.0",
"react-live": "^4.0.0",
"temporal-polyfill": "^0.3.0",
"typescript": "6.0.2",
"uuid": "^13.0.0"
},
Expand Down
9 changes: 2 additions & 7 deletions website/src/components/Playground/PreviewWithScope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as graphql from '@data-client/graphql';
import * as rhReact from '@data-client/react';
import * as rhReactNext from '@data-client/react/next';
import * as rest from '@data-client/rest';
import { Temporal, Intl as PolyIntl } from '@js-temporal/polyfill';
import BigNumber from 'bignumber.js';
import { use } from 'react';
import { LiveProvider } from 'react-live';
Expand All @@ -11,6 +10,7 @@ import { v4 as uuid } from 'uuid';
import * as designSystem from './DesignSystem';
import Preview from './Preview';
import PreviewWrapper from './PreviewWrapper';
import { Temporal, Intl, DateTimeFormat } from './temporal';
import transformCode from './transformCode';
import type { PreviewProps } from './types';
import ResetableErrorBoundary from '../ResettableErrorBoundary';
Expand All @@ -31,11 +31,6 @@ const mockFetch = (getResponse, name, delay = 150) => {
return fetch;
};

const Intl = {
...globalThis.Intl,
...PolyIntl,
};

const scope = {
...rhReact,
...rhReactNext,
Expand All @@ -49,7 +44,7 @@ const scope = {
ResetableErrorBoundary,
Temporal,
Intl,
DateTimeFormat: PolyIntl.DateTimeFormat,
DateTimeFormat,
...designSystem,
};

Expand Down
Loading
Loading