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
21 changes: 11 additions & 10 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"memize": "^2.1.0",
"path-to-regexp": "^6.2.1",
"re-resizable": "^6.4.0",
"react-colorful": "^5.3.1",
"react-colorful": "^5.6.1",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See explanation at #74396 (comment) :

react-colorful and is-plain-object have package issues where they define both "types" and "exports" in their package.json but the "exports" don't specify "types", which TypeScript gets angrier about with "moduleResolution": "bundler". This is fixed in a newer version of react-colorful, but there's no fix available for is-plain-object.

"react-day-picker": "^9.7.0",
"remove-accents": "^0.5.0",
"uuid": "^9.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import deepmerge from 'deepmerge';
import fastDeepEqual from 'fast-deep-equal/es6/index.js';
// @ts-expect-error https://github.com/jonschlinkert/is-plain-object/pull/47
import { isPlainObject } from 'is-plain-object';

/**
Expand Down
6 changes: 6 additions & 0 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ export {
useSlot as __experimentalUseSlot,
useSlotFills as __experimentalUseSlotFills,
} from './slot-fill';
export type {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See explanation at #74396 (comment) :

One of the bigger issues with changing from "moduleResolution": "node" to "moduleResolution": "bundler" were these "inferred type not portable" errors. In some cases I could add explicit exports for the package to help. In others I opted to revert back to "node" which feels like a bandaid.

SlotKey,
SlotComponentProps,
FillComponentProps,
DistributiveOmit,
} from './slot-fill/types';
export { default as __experimentalStyleProvider } from './style-provider';
export { ZStack as __experimentalZStack } from './z-stack';

Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"rootDir": "rules"
},
"references": [ { "path": "../prettier-config" } ],
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-console/index.d.ts

This file was deleted.

7 changes: 3 additions & 4 deletions packages/jest-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,21 @@
"npm": ">=8.19.2"
},
"files": [
"src",
"build",
"build-module",
"build-types"
"declarations.d.ts"
],
"main": "build/index.cjs",
"module": "build-module/index.mjs",
"exports": {
".": {
"types": "./build-types/index.d.ts",
"types": "./declarations.d.ts",
"import": "./build-module/index.mjs",
"require": "./build/index.cjs"
},
"./package.json": "./package.json"
},
"types": "index.d.ts",
"types": "declarations.d.ts",
"dependencies": {
"jest-matcher-utils": "^29.6.2",
"jest-mock": "^29.6.2"
Expand Down
5 changes: 3 additions & 2 deletions packages/jest-console/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"types": [ "jest" ]
"types": [ "jest" ],
"noEmit": true
},
"files": [ "global.d.ts", "src/declarations.d.ts" ]
"files": [ "global.d.ts", "declarations.d.ts" ]
}
1 change: 0 additions & 1 deletion packages/report-flaky-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "CommonJS",
"types": [ "jest" ]
},
"exclude": [ "src/__tests__", "src/__fixtures__" ]
Expand Down
32 changes: 32 additions & 0 deletions packages/sync/src/y-utilities/y-multidoc-undomanager.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { type Observable } from 'lib0/observable';
import { type UndoManager, type Doc, type AbstractType } from 'yjs';

export class YMultiDocUndoManager extends Observable< string > {
docs: Map< Doc, UndoManager >;
trackedOrigins: Set< unknown >;
undoStack: Array< UndoManager >;
redoStack: Array< UndoManager >;

constructor(
typeScope?: AbstractType< any > | Array< AbstractType< any > >,
opts?: NonNullable< ConstructorParameters< typeof UndoManager >[ 1 ] >
);

addToScope(
ytypes: Array< AbstractType< any > > | AbstractType< any >
): void;
addTrackedOrigin( origin: unknown ): void;
removeTrackedOrigin( origin: unknown ): void;
undo(): unknown;
redo(): unknown;
clear( clearUndoStack?: boolean, clearRedoStack?: boolean ): void;
stopCapturing(): void;
canUndo(): boolean;
canRedo(): boolean;
destroy(): void;
}

/**
* @deprecated Use YMultiDocUndoManager instead
*/
export { YMultiDocUndoManager as MultiDocUndoManager };
1 change: 1 addition & 0 deletions packages/sync/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"compilerOptions": {
"types": [ "node" ]
},
"exclude": [ "src/y-utilities/y-multidoc-undomanager.js" ],
"references": [
{ "path": "../hooks" },
{ "path": "../undo-manager" },
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
"target": "esnext",
"module": "esnext",
"module": "preserve",
"lib": [ "DOM", "DOM.Iterable", "ESNext" ],
"declaration": true,
"declarationMap": true,
Expand All @@ -24,7 +24,7 @@
"noFallthroughCasesInSwitch": true,

/* Module Resolution Options */
"moduleResolution": "node",
"moduleResolution": "bundler",

/* This needs to be false so our types are possible to consume without setting this */
"esModuleInterop": false,
Expand Down
Loading