-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Module-first setup * update CHANGELOG
- Loading branch information
Showing
22 changed files
with
2,364 additions
and
7,719 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'prettier', | ||
], | ||
ignorePatterns: ['dist/'], | ||
settings: { | ||
'import/resolver': { | ||
typescript: true, | ||
}, | ||
react: { version: 'detect' }, | ||
}, | ||
rules: { | ||
'import/no-unresolved': ['error', { ignore: ['jotai-cache'] }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
args: 'all', | ||
argsIgnorePattern: '^_', | ||
caughtErrors: 'all', | ||
caughtErrorsIgnorePattern: '^_', | ||
destructuredArrayIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/pnpm-lock.yaml | ||
/dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<html> | ||
<head> | ||
<title>jotai-cache example</title> | ||
<title>example</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
|
2 changes: 1 addition & 1 deletion
2
examples/01_typescript/src/App.tsx → examples/01_typescript/src/app.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"exclude": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,78 +2,80 @@ | |
"name": "jotai-cache", | ||
"description": "👻🗃 ", | ||
"version": "0.4.1", | ||
"type": "module", | ||
"author": "Daishi Kato", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jotaijs/jotai-cache.git" | ||
}, | ||
"source": "./src/index.ts", | ||
"main": "./dist/index.umd.js", | ||
"module": "./dist/index.modern.js", | ||
"types": "./dist/src/index.d.ts", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"module": "./dist/index.modern.js", | ||
"import": "./dist/index.modern.mjs", | ||
"default": "./dist/index.umd.js" | ||
"require": { | ||
"types": "./dist/cjs/index.d.ts", | ||
"default": "./dist/cjs/index.js" | ||
}, | ||
"default": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
} | ||
}, | ||
"sideEffects": false, | ||
"files": [ | ||
"src", | ||
"dist" | ||
], | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"compile": "microbundle build -f modern,umd --globals react=React", | ||
"postcompile": "cp dist/index.modern.mjs dist/index.modern.js && cp dist/index.modern.mjs.map dist/index.modern.js.map", | ||
"test": "run-s eslint tsc-test jest", | ||
"eslint": "eslint --ext .js,.ts,.tsx .", | ||
"jest": "jest", | ||
"tsc-test": "tsc --project . --noEmit", | ||
"examples:01_typescript": "DIR=01_typescript EXT=tsx webpack serve" | ||
}, | ||
"jest": { | ||
"testEnvironment": "jsdom", | ||
"preset": "ts-jest/presets/js-with-ts" | ||
"compile": "rm -rf dist && pnpm run '/^compile:.*/'", | ||
"compile:esm": "tsc -p tsconfig.esm.json", | ||
"compile:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", | ||
"test": "pnpm run '/^test:.*/'", | ||
"test:format": "prettier -c .", | ||
"test:lint": "eslint .", | ||
"test:types": "tsc -p . --noEmit", | ||
"test:types:examples": "tsc -p examples --noEmit", | ||
"test:spec": "vitest run", | ||
"examples:01_typescript": "DIR=01_typescript vite" | ||
}, | ||
"keywords": [ | ||
"jotai", | ||
"react", | ||
"cache" | ||
], | ||
"license": "MIT", | ||
"prettier": { | ||
"singleQuote": true | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.11", | ||
"@types/node": "^20.11.10", | ||
"@types/react": "^18.2.48", | ||
"@types/react-dom": "^18.2.18", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"@typescript-eslint/parser": "^6.20.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"@testing-library/jest-dom": "^6.4.5", | ||
"@testing-library/react": "^15.0.7", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@types/node": "^20.12.11", | ||
"@types/react": "^18.3.2", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.8.0", | ||
"@typescript-eslint/parser": "^7.8.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsx-a11y": "^6.8.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-react": "^7.33.2", | ||
"html-webpack-plugin": "^5.6.0", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"jotai": "^2.6.3", | ||
"microbundle": "^0.15.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.2.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-error-boundary": "^4.0.12", | ||
"ts-jest": "^29.1.2", | ||
"ts-loader": "^9.5.1", | ||
"typescript": "^5.3.3", | ||
"webpack": "^5.90.0", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1" | ||
"eslint-plugin-react": "^7.34.1", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"happy-dom": "^14.10.1", | ||
"jotai": "^2.8.0", | ||
"prettier": "^3.2.5", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"ts-expect": "^1.3.0", | ||
"typescript": "^5.4.5", | ||
"vite": "^5.2.11", | ||
"vitest": "^1.6.0" | ||
}, | ||
"peerDependencies": { | ||
"jotai": ">=2.0.0" | ||
|
Oops, something went wrong.