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
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"homepage": "https://replicache.dev",
"repository": "github:rocicorp/replicache-react",
"type": "module",
"main": "out/index.js",
"module": "out/index.mjs",
"module": "out/index.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"module" is still needed to make Parcel happy.
https://parceljs.org/blog/v2-9-0/#new-resolver

Copy link
Contributor

Choose a reason for hiding this comment

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

🤷‍♂️ you're the boss boss

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a bug report about this on discord a while back. I'm including it here for future historians:

https://discord.com/channels/830183651022471199/830183651022471202/1150524261690253493

"types": "out/index.d.ts",
"exports": "./out/index.js",
"scripts": {
"format": "prettier --write 'src/*.{js,jsx,json,ts,tsx,html,css,md}' '*.{cjs,js,jsx,json,ts,tsx,html,css,md}'",
"check-format": "prettier --check 'src/*.{js,jsx,json,ts,tsx,html,css,md}' '*.{cjs,js,jsx,json,ts,tsx,html,css,md}'",
"check-types": "tsc --noEmit",
"lint": "eslint --ext .ts,.tsx,.js,.jsx src/",
"build-cjs": "tsc --module commonjs --outDir out",
"build-esm": "tsc --module ESNext --outDir out && mv out/index.js out/index.mjs",
"build": "npm run build-esm && npm run build-cjs",
"build": "tsc",
"prepack": "npm run lint && npm run test && npm run build",
"test": "web-test-runner \"src/**/*.test.{jsx,js,ts,tsx}\"",
"test:watch": "npm test -- --watch"
Expand Down Expand Up @@ -48,7 +47,6 @@
},
"files": [
"out/index.js",
"out/index.mjs",
"out/index.d.ts"
]
}
2 changes: 1 addition & 1 deletion src/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import {render} from 'react-dom';
import type {JSONValue, ReadTransaction} from 'replicache';
import {Replicache, TEST_LICENSE_KEY, WriteTransaction} from 'replicache';
import {Subscribable, useSubscribe} from './index';
import {Subscribable, useSubscribe} from './index.js';

function sleep(ms: number | undefined): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"jsx": "react",
"target": "ES2022",
"isolatedModules": true,

"outDir": "out",
"module": "Node16",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,

"declaration": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"moduleResolution": "Node16",
"allowJs": true,
"lib": ["dom", "esnext"],
"skipLibCheck": true
Expand Down