Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sanity-io/pkg-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.17
Choose a base ref
...
head repository: sanity-io/pkg-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref
  • 3 commits
  • 19 files changed
  • 2 contributors

Commits on Jun 4, 2023

  1. feat: init command

    mariuslundgard committed Jun 4, 2023
    Copy the full SHA
    1d977bb View commit details
  2. Copy the full SHA
    0374445 View commit details
  3. Copy the full SHA
    d140553 View commit details
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,16 @@
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.3.0](https://github.com/sanity-io/pkg-utils/compare/v2.2.17...v2.3.0) (2023-06-04)

### Features

- init command ([1d977bb](https://github.com/sanity-io/pkg-utils/commit/1d977bbdd5b5a12a2d2d1289843057c9595f6297))

### Bug Fixes

- **init:** add `package.config.ts` to template ([0374445](https://github.com/sanity-io/pkg-utils/commit/0374445891f68895751aeac16e74aa1ec4bea0fa))

## [2.2.17](https://github.com/sanity-io/pkg-utils/compare/v2.2.16...v2.2.17) (2023-06-04)

### Bug Fixes
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,17 +11,19 @@ npm install @sanity/pkg-utils -D
## Basic usage

```sh
# Initialize a new package
npx @sanity/pkg-utils@latest init

# In a Node.js package directory with `package.json` present

# Check the package
# This will validate the package.json file
pkg-utils
pkg-utils check

# Build the package
pkg-utils build --tsconfig tsconfig.dist.json
pkg-utils build

# Watch the package
pkg-utils watch --tsconfig tsconfig.dist.json
pkg-utils watch
```

Run `pkg-utils -h` for more information on CLI usage.
@@ -38,8 +40,15 @@ control. You may then add a configuration file named `package.config.ts` (or `.j
import {defineConfig} from '@sanity/pkg-utils'

export default defineConfig({
// Minify bundled JavaScript
minify: true,
extract: {
rules: {
// do not require internal members to be prefixed with `_`
'ae-internal-missing-underscore': 'off',
},
},

// the path to the tsconfig file for distributed builds
tsconfig: 'tsconfig.dist.json',
})
```

@@ -89,7 +98,7 @@ Override or modify the value of the `exports` before it’s parsed internally.
```
- Default: `undefined`

Configure the level of reporting of \`@microsoft/api-extractor\` (which is used to bundle the
Configure the level of reporting of [API Extractor](https://api-extractor.com/) (which is used to bundle the
type definitions, as well as lint the TSDoc of the package).

#### `external`
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sanity/pkg-utils",
"version": "2.2.17",
"version": "2.3.0",
"description": "Simple utilities for modern npm packages.",
"keywords": [
"sanity-io",
@@ -139,12 +139,18 @@
"esbuild": "^0.17.19",
"esbuild-register": "^3.4.2",
"find-config": "^1.0.0",
"get-latest-version": "^5.0.1",
"git-url-parse": "^13.1.0",
"globby": "^11.1.0",
"jsonc-parser": "^3.2.0",
"mkdirp": "^3.0.1",
"outdent": "^0.8.0",
"parse-git-config": "^3.0.0",
"pkg-up": "^3.1.0",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.4.3",
"pretty-bytes": "^5.6.0",
"prompts": "^2.4.2",
"recast": "^0.23.2",
"rimraf": "^5.0.1",
"rollup": "^3.23.0",
@@ -162,8 +168,11 @@
"@types/babel__core": "^7.20.1",
"@types/cpx": "^1.5.2",
"@types/find-config": "^1.0.1",
"@types/git-url-parse": "^9.0.1",
"@types/node": "^20.2.5",
"@types/parse-git-config": "^3.0.1",
"@types/prettier": "^2.7.2",
"@types/prompts": "^2.4.4",
"@types/treeify": "^1.0.0",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.59.7",
@@ -180,7 +189,6 @@
"lint-staged": "^13.2.2",
"npm-run-all": "^4.1.5",
"outdent": "^0.8.0",
"prettier-plugin-packagejson": "^2.4.3",
"rollup-plugin-visualizer": "^5.9.0",
"semantic-release": "^21.0.2",
"ts-node": "^10.9.1",
Loading