package.package.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swr Show documentation
Show all versions of swr Show documentation
React Hooks library for remote data fetching
{
"name": "swr",
"version": "2.1.0",
"description": "React Hooks library for remote data fetching",
"keywords": [
"swr",
"react",
"hooks",
"request",
"cache",
"fetch"
],
"packageManager": "[email protected]",
"main": "./core/dist/index.js",
"module": "./core/dist/index.esm.js",
"types": "./core/dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./core/dist/index.d.ts",
"import": "./core/dist/index.mjs",
"module": "./core/dist/index.esm.js",
"require": "./core/dist/index.js"
},
"./infinite": {
"types": "./infinite/dist/infinite/index.d.ts",
"import": "./infinite/dist/index.mjs",
"module": "./infinite/dist/index.esm.js",
"require": "./infinite/dist/index.js"
},
"./immutable": {
"types": "./immutable/dist/immutable/index.d.ts",
"import": "./immutable/dist/index.mjs",
"module": "./immutable/dist/index.esm.js",
"require": "./immutable/dist/index.js"
},
"./subscription": {
"types": "./subscription/dist/index.d.ts",
"import": "./subscription/dist/index.mjs",
"module": "./subscription/dist/index.esm.js",
"require": "./subscription/dist/index.js"
},
"./mutation": {
"types": "./mutation/dist/mutation/index.d.ts",
"import": "./mutation/dist/index.mjs",
"module": "./mutation/dist/index.esm.js",
"require": "./mutation/dist/index.js"
},
"./_internal": {
"types": "./_internal/dist/index.d.ts",
"import": "./_internal/dist/index.mjs",
"module": "./_internal/dist/index.esm.js",
"require": "./_internal/dist/index.js"
}
},
"files": [
"core/dist/**/*.{js,d.ts,mjs}",
"infinite/dist/**/*.{js,d.ts,mjs}",
"immutable/dist/**/*.{js,d.ts,mjs}",
"mutation/dist/**/*.{js,d.ts,mjs}",
"_internal/dist/**/*.{js,d.ts,mjs}",
"subscription/dist/*.{js,d.ts,mjs}",
"core/package.json",
"infinite/package.json",
"immutable/package.json",
"mutation/package.json",
"_internal/package.json",
"subscription/package.json"
],
"repository": "github:vercel/swr",
"homepage": "https://swr.vercel.app",
"license": "MIT",
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix --cache",
"prettier --write"
]
},
"devDependencies": {
"@swc/core": "^1.3.29",
"@swc/jest": "0.2.24",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@type-challenges/utils": "0.1.1",
"@types/jest": "^29.4.0",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/use-sync-external-store": "^0.0.3",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.49.0",
"bunchee": "2.2.0",
"eslint": "8.32.0",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-jest-dom": "4.0.3",
"eslint-plugin-react": "7.32.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-testing-library": "5.10.0",
"husky": "8.0.3",
"jest": "29.4.1",
"jest-environment-jsdom": "29.4.1",
"lint-staged": "13.1.0",
"next": "^13.1.6",
"prettier": "2.8.3",
"publint": "^0.1.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "4.1.2",
"typescript": "4.9.4",
"@playwright/test": "^1.30.0",
"swr": "2.1.0"
},
"peerDependencies": {
"react": "^16.11.0 || ^17.0.0 || ^18.0.0"
},
"prettier": {
"tabWidth": 2,
"semi": false,
"useTabs": false,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "none"
},
"engines": {
"pnpm": "7"
},
"dependencies": {
"use-sync-external-store": "^1.2.0"
},
"scripts": {
"csb:install": "pnpm install",
"csb:build": "pnpm build",
"clean": "pnpm -r run clean && rimraf playwright-report test-result",
"watch": "pnpm -r run watch",
"build": "pnpm build-package _internal && pnpm build-package core && pnpm build-package infinite && pnpm build-package immutable && pnpm build-package mutation && pnpm build-package subscription",
"build:e2e": "pnpm next build e2e/site -- --profile",
"build-package": "bunchee index.ts --cwd",
"types:check": "pnpm -r run types:check",
"publish-beta": "pnpm publish --tag beta",
"format": "prettier --write ./**/*.{ts,tsx}",
"lint": "eslint . --ext .ts,.tsx --cache",
"lint:fix": "pnpm lint --fix",
"coverage": "jest --coverage",
"test-typing": "tsc --noEmit -p test/type/tsconfig.json && tsc --noEmit -p test/tsconfig.json",
"test-packaging": "publint",
"test": "jest",
"test:e2e": "playwright test",
"run-all-checks": "pnpm types:check && pnpm lint && pnpm test && pnpm test-typing"
}
}