Skip to content

Commit

Permalink
fix(deps): applied npx @sanity/plugin-kit inject
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Jan 4, 2023
1 parent 72d536c commit a2631da
Show file tree
Hide file tree
Showing 10 changed files with 3,525 additions and 3,312 deletions.
10 changes: 1 addition & 9 deletions .eslintignore
@@ -1,14 +1,6 @@
*.js
.eslintrc.js
commitlint.config.js
lib
lint-staged.config.js
rollup.config.js
node_modules
tools/
docs
jest.config.js
babel.config.js
coverage
*.md
*.js
package.config.ts
8 changes: 7 additions & 1 deletion .gitignore
Expand Up @@ -49,8 +49,14 @@ jspm_packages
# Cache
.cache

# Yalc
.yalc
yalc.lock

# npm package zips
*.tgz

# Compiled plugin
lib

docs

4 changes: 4 additions & 0 deletions .prettierignore
@@ -0,0 +1,4 @@
lib
pnpm-lock.yaml
yarn.lock
package-lock.json
File renamed without changes.
6,699 changes: 3,441 additions & 3,258 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions package.config.ts
@@ -1,7 +1,17 @@
import {defineConfig} from '@sanity/pkg-utils'

export default defineConfig({
dist: 'lib',
minify: true,
legacyExports: true,
dist: 'lib',
tsconfig: 'tsconfig.lib.json',

// Remove this block to enable strict export validation
extract: {
rules: {
'ae-forgotten-export': 'off',
'ae-incompatible-release-tags': 'off',
'ae-internal-missing-underscore': 'off',
'ae-missing-release-tag': 'off',
},
},
})
44 changes: 23 additions & 21 deletions package.json
Expand Up @@ -22,7 +22,7 @@
"author": "Sanity.io <hello@sanity.io>",
"exports": {
".": {
"types": "./lib/src/index.d.ts",
"types": "./lib/index.d.ts",
"source": "./src/index.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.js",
Expand All @@ -33,27 +33,28 @@
"main": "./lib/index.js",
"module": "./lib/index.esm.js",
"source": "./src/index.ts",
"types": "./lib/src/index.d.ts",
"types": "./lib/index.d.ts",
"files": [
"src",
"lib",
"v2-incompatible.js",
"sanity.json"
"sanity.json",
"src",
"v2-incompatible.js"
],
"scripts": {
"clean": "rimraf lib",
"lint": "eslint .",
"prebuild": "npm run clean && plugin-kit verify-package --silent && pkg-utils",
"build": "pkg-utils build --strict",
"watch": "pkg-utils watch",
"build": "run-s clean && plugin-kit verify-package --silent && pkg-utils build --strict && pkg-utils --strict",
"watch": "pkg-utils watch --strict",
"link-watch": "plugin-kit link-watch",
"test": "echo 'no tests for now'",
"deploy-docs": "ts-node tools/gh-pages-publish",
"report-coverage": "cat ./coverage/lcov.info | coveralls",
"precommit": "lint-staged",
"compile": "tsc --noEmit",
"prepublishOnly": "npm run build",
"prepare": "husky install"
"prepublishOnly": "run-s build",
"prepare": "husky install",
"format": "prettier --write --cache --ignore-unknown ."
},
"dependencies": {
"@sanity/incompatible-plugin": "^1.0.4",
Expand All @@ -66,47 +67,48 @@
"devDependencies": {
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@sanity/pkg-utils": "^1.18.0",
"@sanity/plugin-kit": "^2.1.8",
"@sanity/pkg-utils": "^2.1.0",
"@sanity/plugin-kit": "^3.1.1",
"@sanity/semantic-release-preset": "^2.0.2",
"@types/lodash": "^4.14.188",
"@types/node": "^18.11.9",
"@types/react": "^18",
"@types/react": "^18.0.26",
"@types/react-dom": "^18",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"colors": "^1.4.0",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-sanity": "^6.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.2",
"lint-staged": "^13.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"prettier": "^2.8.1",
"prettier-plugin-packagejson": "^2.3.0",
"prompt": "^1.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"replace-in-file": "^6.3.5",
"rimraf": "^3.0.2",
"sanity": "^3.0.0",
"sanity": "^3.1.4",
"shelljs": "^0.8.5",
"styled-components": "^5.3.6",
"ts-node": "^10.9.1",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^4.8.4"
"typescript": "^4.9.4"
},
"peerDependencies": {
"react": "^18",
"react-dom": "^18",
"sanity": "^3.0.0",
"sanity": "^3",
"styled-components": "^5.2"
},
"engines": {
Expand Down
27 changes: 6 additions & 21 deletions tsconfig.json
@@ -1,24 +1,9 @@
{
"extends": "./tsconfig.settings",
"include": ["./src", "./package.config.ts"],
"compilerOptions": {
"jsx": "preserve",
"moduleResolution": "node",
"target": "esnext",
"module": "esnext",
"esModuleInterop": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"strict": true,
"sourceMap": false,
"inlineSourceMap": false,
"downlevelIteration": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"outDir": "lib",
"skipLibCheck": true,
"isolatedModules": true,
"checkJs": false,
"rootDir": "src"
},
"include": ["src/**/*"]
"rootDir": ".",
"jsx": "react-jsx",
"noEmit": true
}
}
16 changes: 16 additions & 0 deletions tsconfig.lib.json
@@ -0,0 +1,16 @@
{
"extends": "./tsconfig.settings",
"include": ["./src"],
"exclude": [
"./src/**/__fixtures__",
"./src/**/__mocks__",
"./src/**/*.test.ts",
"./src/**/*.test.tsx"
],
"compilerOptions": {
"rootDir": ".",
"outDir": "./lib",
"jsx": "react-jsx",
"emitDeclarationOnly": true
}
}
15 changes: 15 additions & 0 deletions tsconfig.settings.json
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"moduleResolution": "node",
"target": "esnext",
"module": "esnext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"esModuleInterop": true,
"strict": true,
"downlevelIteration": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"isolatedModules": true
}
}

0 comments on commit a2631da

Please sign in to comment.