@oorabona/release-it-preset 0.3.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/LICENSE +21 -0
- package/README.md +833 -0
- package/bin/cli.js +180 -0
- package/bin/run-script.js +72 -0
- package/config/changelog-only.js +41 -0
- package/config/default.js +54 -0
- package/config/helpers.js +52 -0
- package/config/hotfix.js +51 -0
- package/config/manual-changelog.js +64 -0
- package/config/no-changelog.js +40 -0
- package/config/republish.js +60 -0
- package/config/retry-publish.js +40 -0
- package/dist/scripts/check-config.js +285 -0
- package/dist/scripts/check-pr-status.js +164 -0
- package/dist/scripts/extract-changelog.js +66 -0
- package/dist/scripts/init-project.js +191 -0
- package/dist/scripts/lib/commit-parser.js +67 -0
- package/dist/scripts/lib/git-utils.js +33 -0
- package/dist/scripts/lib/semver-utils.js +26 -0
- package/dist/scripts/lib/string-utils.js +12 -0
- package/dist/scripts/populate-unreleased-changelog.js +236 -0
- package/dist/scripts/republish-changelog.js +187 -0
- package/dist/scripts/retry-publish.js +98 -0
- package/dist/scripts/validate-release.js +288 -0
- package/dist/types/check-config.d.ts +65 -0
- package/dist/types/check-pr-status.d.ts +51 -0
- package/dist/types/extract-changelog.d.ts +23 -0
- package/dist/types/init-project.d.ts +37 -0
- package/dist/types/lib/commit-parser.d.ts +44 -0
- package/dist/types/lib/git-utils.d.ts +20 -0
- package/dist/types/lib/semver-utils.d.ts +18 -0
- package/dist/types/lib/string-utils.d.ts +10 -0
- package/dist/types/populate-unreleased-changelog.d.ts +56 -0
- package/dist/types/republish-changelog.d.ts +39 -0
- package/dist/types/retry-publish.d.ts +33 -0
- package/dist/types/validate-release.d.ts +43 -0
- package/package.json +93 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Extract changelog entry for a specific version
|
|
4
|
+
*
|
|
5
|
+
* This script reads CHANGELOG.md and extracts the section for a given version.
|
|
6
|
+
* Used primarily for generating GitHub release notes.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* tsx extract-changelog.ts <version>
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* tsx extract-changelog.ts 1.2.3
|
|
13
|
+
*
|
|
14
|
+
* Environment variables:
|
|
15
|
+
* CHANGELOG_FILE - Path to changelog file (default: CHANGELOG.md)
|
|
16
|
+
*/
|
|
17
|
+
import { readFileSync } from 'node:fs';
|
|
18
|
+
export interface ExtractChangelogDeps {
|
|
19
|
+
readFileSync: typeof readFileSync;
|
|
20
|
+
getEnv: (key: string) => string | undefined;
|
|
21
|
+
getCwd: () => string;
|
|
22
|
+
}
|
|
23
|
+
export declare function extractChangelog(version: string, deps: ExtractChangelogDeps): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Initialize a project with release-it-preset
|
|
4
|
+
*
|
|
5
|
+
* This script:
|
|
6
|
+
* - Creates CHANGELOG.md with Keep a Changelog template
|
|
7
|
+
* - Creates .release-it.json with extends configuration
|
|
8
|
+
* - Optionally adds scripts to package.json
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* tsx init-project.ts [--yes]
|
|
12
|
+
*
|
|
13
|
+
* Options:
|
|
14
|
+
* --yes Skip prompts and use defaults
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
17
|
+
interface Options {
|
|
18
|
+
yes: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface InitProjectDeps {
|
|
21
|
+
existsSync: typeof existsSync;
|
|
22
|
+
readFileSync: typeof readFileSync;
|
|
23
|
+
writeFileSync: typeof writeFileSync;
|
|
24
|
+
prompt: (question: string) => Promise<boolean>;
|
|
25
|
+
log: (message: string) => void;
|
|
26
|
+
warn: (message: string) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare function parseArgs(args?: string[]): Options;
|
|
29
|
+
export declare function createChangelog(options: Options, deps: InitProjectDeps): Promise<boolean>;
|
|
30
|
+
export declare function createReleaseItConfig(options: Options, deps: InitProjectDeps): Promise<boolean>;
|
|
31
|
+
export declare function updatePackageJson(options: Options, deps: InitProjectDeps): Promise<boolean>;
|
|
32
|
+
export declare function initProject(options: Options, deps: InitProjectDeps): Promise<{
|
|
33
|
+
changelog: boolean;
|
|
34
|
+
releaseIt: boolean;
|
|
35
|
+
packageJson: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conventional commit parsing utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Regex pattern for matching conventional commits
|
|
6
|
+
* Matches: type(scope)?: description
|
|
7
|
+
* Example: feat(api): add new endpoint
|
|
8
|
+
*/
|
|
9
|
+
export declare const CONVENTIONAL_COMMIT_REGEX: RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* Strict conventional commit types as defined by Conventional Commits specification
|
|
12
|
+
* Used for strict validation in PR checks
|
|
13
|
+
*/
|
|
14
|
+
export declare const STRICT_CONVENTIONAL_TYPES: readonly ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "build", "ci", "revert"];
|
|
15
|
+
/**
|
|
16
|
+
* Regex for strict conventional commit validation (only approved types)
|
|
17
|
+
*/
|
|
18
|
+
export declare const STRICT_CONVENTIONAL_COMMIT_REGEX: RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a commit message matches conventional commit format (lenient)
|
|
21
|
+
*
|
|
22
|
+
* @param message Commit message to check
|
|
23
|
+
* @returns true if message matches conventional format
|
|
24
|
+
*/
|
|
25
|
+
export declare function isConventionalCommit(message: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a commit message matches strict conventional commit format
|
|
28
|
+
*
|
|
29
|
+
* @param message Commit message to check
|
|
30
|
+
* @returns true if message matches strict format
|
|
31
|
+
*/
|
|
32
|
+
export declare function isStrictConventionalCommit(message: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Extract conventional commit parts from a message
|
|
35
|
+
*
|
|
36
|
+
* @param message Commit message
|
|
37
|
+
* @returns Parsed parts or null if not conventional
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseConventionalCommit(message: string): {
|
|
40
|
+
type: string;
|
|
41
|
+
scope?: string;
|
|
42
|
+
breaking: boolean;
|
|
43
|
+
description: string;
|
|
44
|
+
} | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git utility functions shared across scripts
|
|
3
|
+
*/
|
|
4
|
+
import type { ExecSyncOptions } from 'node:child_process';
|
|
5
|
+
export interface GitDeps {
|
|
6
|
+
execSync: (command: string, options?: ExecSyncOptions) => Buffer | string;
|
|
7
|
+
getEnv: (key: string) => string | undefined;
|
|
8
|
+
warn?: (message: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get GitHub repository URL for commit/tag links
|
|
12
|
+
*
|
|
13
|
+
* Priority:
|
|
14
|
+
* 1. GITHUB_REPOSITORY environment variable (format: owner/repo)
|
|
15
|
+
* 2. Git remote URL (extracted from git config)
|
|
16
|
+
*
|
|
17
|
+
* @param deps Dependencies for git operations
|
|
18
|
+
* @returns Repository URL or empty string if not determinable
|
|
19
|
+
*/
|
|
20
|
+
export declare function getGitHubRepoUrl(deps: GitDeps): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic versioning utility functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Validate if a string is a valid semantic version
|
|
6
|
+
*
|
|
7
|
+
* @param version Version string to validate (can have optional 'v' prefix)
|
|
8
|
+
* @returns true if valid semver, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
export declare function isValidSemver(version: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Validate and normalize a semantic version string
|
|
13
|
+
*
|
|
14
|
+
* @param version Version string to validate
|
|
15
|
+
* @throws Error if version is not valid semver
|
|
16
|
+
* @returns Normalized version without 'v' prefix
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateAndNormalizeSemver(version: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String utility functions shared across scripts
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Escape special regex characters in a string
|
|
6
|
+
*
|
|
7
|
+
* @param input String to escape
|
|
8
|
+
* @returns Escaped string safe for use in RegExp
|
|
9
|
+
*/
|
|
10
|
+
export declare function escapeRegExp(input: string): string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Populate [Unreleased] section with commits since the last tag
|
|
4
|
+
*
|
|
5
|
+
* This script:
|
|
6
|
+
* - Extracts commits since the last git tag
|
|
7
|
+
* - Parses conventional commit messages
|
|
8
|
+
* - Groups commits by type (Added, Fixed, Changed, etc.)
|
|
9
|
+
* - Updates the [Unreleased] section in CHANGELOG.md
|
|
10
|
+
* - Generates commit links using the repository URL
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* tsx populate-unreleased-changelog.ts
|
|
14
|
+
*
|
|
15
|
+
* Environment variables:
|
|
16
|
+
* CHANGELOG_FILE - Path to changelog file (default: CHANGELOG.md)
|
|
17
|
+
* GITHUB_REPOSITORY - GitHub repo (owner/repo) for commit links
|
|
18
|
+
* GIT_REMOTE - Git remote name (default: origin)
|
|
19
|
+
*/
|
|
20
|
+
import type { ExecSyncOptions } from 'node:child_process';
|
|
21
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
22
|
+
/**
|
|
23
|
+
* Dependencies interface for dependency injection
|
|
24
|
+
*/
|
|
25
|
+
export interface PopulateChangelogDeps {
|
|
26
|
+
execSync: (command: string, options?: ExecSyncOptions) => Buffer | string;
|
|
27
|
+
readFileSync: typeof readFileSync;
|
|
28
|
+
writeFileSync: typeof writeFileSync;
|
|
29
|
+
getEnv: (key: string) => string | undefined;
|
|
30
|
+
log: (message: string) => void;
|
|
31
|
+
warn: (message: string) => void;
|
|
32
|
+
error: (message: string) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface CommitPart {
|
|
35
|
+
type: string;
|
|
36
|
+
scope?: string;
|
|
37
|
+
description: string;
|
|
38
|
+
sha: string;
|
|
39
|
+
breaking?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extract all conventional commit patterns from a commit body
|
|
43
|
+
*/
|
|
44
|
+
export declare function extractConventionalCommitParts(commitBody: string, sha: string): CommitPart[];
|
|
45
|
+
/**
|
|
46
|
+
* Normalize commit types to standard changelog categories
|
|
47
|
+
*/
|
|
48
|
+
export declare function normalizeCommitType(type: string): string | false;
|
|
49
|
+
/**
|
|
50
|
+
* Parse git log output and extract all conventional commit parts
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseCommitsWithMultiplePrefixes(gitOutput: string, repoUrl: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Main function to populate changelog with dependency injection
|
|
55
|
+
*/
|
|
56
|
+
export declare function populateChangelog(deps: PopulateChangelogDeps): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Republish changelog script
|
|
4
|
+
*
|
|
5
|
+
* This script handles republishing an existing version without bumping.
|
|
6
|
+
* Used when a git tag exists but the package was never published to npm.
|
|
7
|
+
*
|
|
8
|
+
* Unlike normal changelog update, this script:
|
|
9
|
+
* - Uses the existing tag version from package.json
|
|
10
|
+
* - Moves [Unreleased] content to the correct version entry
|
|
11
|
+
* - Handles the case where the version entry might already exist
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* tsx republish-changelog.ts
|
|
15
|
+
*
|
|
16
|
+
* Environment variables:
|
|
17
|
+
* CHANGELOG_FILE - Path to changelog file (default: CHANGELOG.md)
|
|
18
|
+
* GITHUB_REPOSITORY - GitHub repo (owner/repo) for commit links
|
|
19
|
+
* GIT_REMOTE - Git remote name (default: origin)
|
|
20
|
+
*/
|
|
21
|
+
import type { ExecSyncOptions } from 'node:child_process';
|
|
22
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
23
|
+
export interface RepublishChangelogDeps {
|
|
24
|
+
execSync: (command: string, options?: ExecSyncOptions) => Buffer | string;
|
|
25
|
+
readFileSync: typeof readFileSync;
|
|
26
|
+
writeFileSync: typeof writeFileSync;
|
|
27
|
+
getEnv: (key: string) => string | undefined;
|
|
28
|
+
getCwd: () => string;
|
|
29
|
+
getDate: () => string;
|
|
30
|
+
log: (message: string) => void;
|
|
31
|
+
warn: (message: string) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface UpdateReferenceLinksResult {
|
|
34
|
+
changelog: string;
|
|
35
|
+
addedUnreleasedLink: boolean;
|
|
36
|
+
addedVersionLinks: string[];
|
|
37
|
+
}
|
|
38
|
+
export declare function updateReferenceLinks(changelog: string, versionLabels: string[], linkTarget: string, unreleasedLine: string): UpdateReferenceLinksResult;
|
|
39
|
+
export declare function republishChangelog(version: string, deps: RepublishChangelogDeps): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Retry publish script
|
|
4
|
+
*
|
|
5
|
+
* This script retries publishing an existing version to npm and GitHub Releases.
|
|
6
|
+
* Used when the initial publish failed but the Git tag was already created.
|
|
7
|
+
*
|
|
8
|
+
* Safety features:
|
|
9
|
+
* - Checks out the exact commit of the latest tag
|
|
10
|
+
* - Doesn't modify any Git history
|
|
11
|
+
* - Restores the original branch after publishing
|
|
12
|
+
* - Verifies the tag exists before proceeding
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* tsx retry-publish.ts
|
|
16
|
+
* # Then run: release-it --config retry-publish.js
|
|
17
|
+
*/
|
|
18
|
+
import type { ExecSyncOptions } from 'node:child_process';
|
|
19
|
+
import { readFileSync } from 'node:fs';
|
|
20
|
+
export interface RetryPublishDeps {
|
|
21
|
+
execSync: (command: string, options?: ExecSyncOptions) => Buffer | string;
|
|
22
|
+
log: (message: string) => void;
|
|
23
|
+
warn: (message: string) => void;
|
|
24
|
+
readFileSync: typeof readFileSync;
|
|
25
|
+
}
|
|
26
|
+
export interface RetryPublishResult {
|
|
27
|
+
currentBranch: string;
|
|
28
|
+
latestTag: string;
|
|
29
|
+
tagCommit: string;
|
|
30
|
+
hasUncommittedChanges: boolean;
|
|
31
|
+
packageVersion?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function retryPublish(deps: RetryPublishDeps): RetryPublishResult;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Validate project is ready for release
|
|
4
|
+
*
|
|
5
|
+
* This script checks:
|
|
6
|
+
* - CHANGELOG.md exists and is well-formatted
|
|
7
|
+
* - [Unreleased] section has content
|
|
8
|
+
* - Working directory is clean (unless --allow-dirty)
|
|
9
|
+
* - npm authentication works (npm whoami)
|
|
10
|
+
* - Current branch is allowed (if GIT_REQUIRE_BRANCH is set)
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* tsx validate-release.ts [--allow-dirty]
|
|
14
|
+
*
|
|
15
|
+
* Exit codes:
|
|
16
|
+
* 0 - All validations passed
|
|
17
|
+
* 1 - Validation failed
|
|
18
|
+
*/
|
|
19
|
+
import type { ExecSyncOptions } from 'node:child_process';
|
|
20
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
21
|
+
export interface ValidationResult {
|
|
22
|
+
name: string;
|
|
23
|
+
passed: boolean;
|
|
24
|
+
message?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidateOptions {
|
|
27
|
+
allowDirty: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface ValidateReleaseDeps {
|
|
30
|
+
execSync: (command: string, options?: ExecSyncOptions) => Buffer | string;
|
|
31
|
+
existsSync: typeof existsSync;
|
|
32
|
+
readFileSync: typeof readFileSync;
|
|
33
|
+
getEnv: (key: string) => string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export declare function parseArgs(argv: string[]): ValidateOptions;
|
|
36
|
+
export declare function validateChangelogExists(deps: ValidateReleaseDeps): ValidationResult;
|
|
37
|
+
export declare function validateChangelogFormat(deps: ValidateReleaseDeps): ValidationResult;
|
|
38
|
+
export declare function validateUnreleasedHasContent(deps: ValidateReleaseDeps): ValidationResult;
|
|
39
|
+
export declare function validateWorkingDirectoryClean(deps: ValidateReleaseDeps, options: ValidateOptions): ValidationResult;
|
|
40
|
+
export declare function validateNpmAuth(deps: ValidateReleaseDeps): ValidationResult;
|
|
41
|
+
export declare function validateBranch(deps: ValidateReleaseDeps): ValidationResult;
|
|
42
|
+
export declare function validateGitRepo(deps: ValidateReleaseDeps): ValidationResult;
|
|
43
|
+
export declare function validateRelease(deps: ValidateReleaseDeps, options: ValidateOptions): ValidationResult[];
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oorabona/release-it-preset",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Shared release-it configuration and scripts for the organisation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"release-it",
|
|
8
|
+
"release",
|
|
9
|
+
"version",
|
|
10
|
+
"changelog",
|
|
11
|
+
"conventional-commits",
|
|
12
|
+
"keep-a-changelog"
|
|
13
|
+
],
|
|
14
|
+
"author": "Olivier Orabona",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/oorabona/release-it-preset.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/oorabona/release-it-preset/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/oorabona/release-it-preset#readme",
|
|
24
|
+
"bin": {
|
|
25
|
+
"release-it-preset": "bin/cli.js"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
"./config/default": "./config/default.js",
|
|
29
|
+
"./config/hotfix": "./config/hotfix.js",
|
|
30
|
+
"./config/changelog-only": "./config/changelog-only.js",
|
|
31
|
+
"./config/manual-changelog": "./config/manual-changelog.js",
|
|
32
|
+
"./config/no-changelog": "./config/no-changelog.js",
|
|
33
|
+
"./config/republish": "./config/republish.js",
|
|
34
|
+
"./config/retry-publish": "./config/retry-publish.js",
|
|
35
|
+
"./scripts/*": {
|
|
36
|
+
"types": "./dist/types/*.d.ts",
|
|
37
|
+
"default": "./dist/scripts/*.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"bin",
|
|
42
|
+
"config",
|
|
43
|
+
"dist/scripts",
|
|
44
|
+
"dist/types",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"release-it-preset": "node ./bin/cli.js",
|
|
50
|
+
"release": "pnpm run release:default",
|
|
51
|
+
"release:default": "node ./bin/cli.js default",
|
|
52
|
+
"release:default:dry-run": "node ./bin/cli.js default --dry-run",
|
|
53
|
+
"release:no-changelog": "node ./bin/cli.js no-changelog",
|
|
54
|
+
"release:changelog-only": "node ./bin/cli.js changelog-only",
|
|
55
|
+
"release:manual-changelog": "node ./bin/cli.js manual-changelog",
|
|
56
|
+
"release:hotfix": "node ./bin/cli.js hotfix",
|
|
57
|
+
"release:republish": "node ./bin/cli.js republish",
|
|
58
|
+
"release:retry-publish": "node ./bin/cli.js retry-publish",
|
|
59
|
+
"release:update": "node ./bin/cli.js update",
|
|
60
|
+
"release:validate": "node ./bin/cli.js validate",
|
|
61
|
+
"release:validate:allow-dirty": "node ./bin/cli.js validate --allow-dirty",
|
|
62
|
+
"release:check": "node ./bin/cli.js check",
|
|
63
|
+
"build": "tsc -p tsconfig.json",
|
|
64
|
+
"clean": "rimraf dist || rm -rf dist",
|
|
65
|
+
"lint": "biome check --write .",
|
|
66
|
+
"lint:check": "biome check .",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:unit": "vitest run tests/unit/*.test.ts",
|
|
69
|
+
"test:unit:watch": "vitest tests/unit/*.test.ts",
|
|
70
|
+
"test:unit:coverage": "vitest run tests/unit/*.test.ts --coverage",
|
|
71
|
+
"test:watch": "vitest",
|
|
72
|
+
"test:coverage": "vitest run --coverage",
|
|
73
|
+
"test:ui": "vitest --ui",
|
|
74
|
+
"prepublishOnly": "pnpm build && echo 'Running prepublish checks...' && test -f README.md && test -f LICENSE"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"release-it": "^19.0.0"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@biomejs/biome": "^2.2.5",
|
|
81
|
+
"@types/node": "^22.10.5",
|
|
82
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
83
|
+
"nano-staged": "^0.8.0",
|
|
84
|
+
"rimraf": "^6.0.1",
|
|
85
|
+
"tsx": "^4.20.6",
|
|
86
|
+
"typescript": "^5.7.3",
|
|
87
|
+
"vitest": "^3.2.4"
|
|
88
|
+
},
|
|
89
|
+
"engines": {
|
|
90
|
+
"node": ">=18.0.0"
|
|
91
|
+
},
|
|
92
|
+
"packageManager": "pnpm@10.17.1"
|
|
93
|
+
}
|