@sanity/pkg-utils 3.2.5 → 3.2.6-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/pkg-utils",
3
- "version": "3.2.5",
3
+ "version": "3.2.6-canary.0",
4
4
  "description": "Simple utilities for modern npm packages.",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -46,6 +46,24 @@
46
46
  "!dist/stats.html",
47
47
  "src"
48
48
  ],
49
+ "scripts": {
50
+ "build": "run-s clean build:pkg check:pkg",
51
+ "build:pkg": "node -r esbuild-register scripts/build",
52
+ "check:pkg": "node -r esbuild-register scripts/check",
53
+ "check:types": "tsc --build",
54
+ "clean": "rimraf dist test/env/__tmp__",
55
+ "commit": "cz",
56
+ "extract": "sanity-tsdoc etl --outDir etc/api/@sanity/pkg-utils --tsconfig tsconfig.dist.json",
57
+ "format": "prettier --write --cache --ignore-unknown . && eslint . --ext .cjs,.js,.ts,.tsx --fix --quiet",
58
+ "lint": "eslint . --ext .cjs,.js,.ts,.tsx",
59
+ "playground:build": "pnpm --filter './playground/**' build",
60
+ "playground:clean": "pnpm --filter './playground/**' --silent clean",
61
+ "prepublishOnly": "pnpm run build",
62
+ "test": "run-s playground:clean test:clean vitest:run",
63
+ "test:clean": "rimraf test/env/__tmp__",
64
+ "vitest:run": "vitest run",
65
+ "watch": "node -r esbuild-register scripts/watch"
66
+ },
49
67
  "commitlint": {
50
68
  "extends": [
51
69
  "@commitlint/config-conventional"
@@ -100,7 +118,8 @@
100
118
  "devDependencies": {
101
119
  "@commitlint/cli": "^18.4.3",
102
120
  "@commitlint/config-conventional": "^18.4.3",
103
- "@types/babel__core": "^7.20.4",
121
+ "@sanity/pkg-utils": "workspace:*",
122
+ "@types/babel__core": "^7.20.5",
104
123
  "@types/cpx": "^1.5.5",
105
124
  "@types/find-config": "^1.0.4",
106
125
  "@types/git-url-parse": "^9.0.3",
@@ -110,8 +129,8 @@
110
129
  "@types/rimraf": "^3.0.2",
111
130
  "@types/treeify": "^1.0.3",
112
131
  "@types/uuid": "^9.0.7",
113
- "@typescript-eslint/eslint-plugin": "^6.12.0",
114
- "@typescript-eslint/parser": "^6.12.0",
132
+ "@typescript-eslint/eslint-plugin": "^6.13.0",
133
+ "@typescript-eslint/parser": "^6.13.0",
115
134
  "commitizen": "^4.3.0",
116
135
  "cpx": "^1.5.0",
117
136
  "cz-conventional-changelog": "^3.3.0",
@@ -129,8 +148,7 @@
129
148
  "ts-node": "^10.9.1",
130
149
  "typescript": "^5.3.2",
131
150
  "vitest": "^0.34.6",
132
- "vitest-github-actions-reporter": "^0.11.0",
133
- "@sanity/pkg-utils": "3.2.5"
151
+ "vitest-github-actions-reporter": "^0.11.0"
134
152
  },
135
153
  "peerDependencies": {
136
154
  "typescript": "^4.7 || ^5"
@@ -142,21 +160,9 @@
142
160
  "publishConfig": {
143
161
  "access": "public"
144
162
  },
145
- "scripts": {
146
- "build": "run-s clean build:pkg check:pkg",
147
- "build:pkg": "node -r esbuild-register scripts/build",
148
- "check:pkg": "node -r esbuild-register scripts/check",
149
- "check:types": "tsc --build",
150
- "clean": "rimraf dist test/env/__tmp__",
151
- "commit": "cz",
152
- "extract": "sanity-tsdoc etl --outDir etc/api/@sanity/pkg-utils --tsconfig tsconfig.dist.json",
153
- "format": "prettier --write --cache --ignore-unknown . && eslint . --ext .cjs,.js,.ts,.tsx --fix --quiet",
154
- "lint": "eslint . --ext .cjs,.js,.ts,.tsx",
155
- "playground:build": "pnpm --filter './playground/**' build",
156
- "playground:clean": "pnpm --filter './playground/**' --silent clean",
157
- "test": "run-s playground:clean test:clean vitest:run",
158
- "test:clean": "rimraf test/env/__tmp__",
159
- "vitest:run": "vitest run",
160
- "watch": "node -r esbuild-register scripts/watch"
163
+ "pnpm": {
164
+ "overrides": {
165
+ "@sanity/pkg-utils": "workspace:*"
166
+ }
161
167
  }
162
- }
168
+ }
@@ -1,5 +1,5 @@
1
1
  import {type PluginItem as BabelPluginItem} from '@babel/core'
2
- import {type Plugin as RollupPlugin} from 'rollup'
2
+ import {NormalizedOutputOptions, type Plugin as RollupPlugin} from 'rollup'
3
3
 
4
4
  // re-export
5
5
  export type {RollupPlugin}
@@ -119,6 +119,7 @@ export interface PkgConfigOptions {
119
119
  /** @alpha */
120
120
  rollup?: {
121
121
  plugins?: PkgConfigProperty<RollupPlugin[]>
122
+ output?: Partial<NormalizedOutputOptions>
122
123
  }
123
124
  /**
124
125
  * Default runtime of package exports
@@ -215,6 +215,7 @@ export function resolveRollupConfig(
215
215
  minifyInternalExports: minify,
216
216
  sourcemap: config?.sourcemap ?? true,
217
217
  hoistTransitiveImports: false,
218
+ ...config?.rollup?.output,
218
219
  },
219
220
  }
220
221
  }