Skip to content

Commit 053ca27

Browse files
authored
Merge pull request #313 from Airfooox/master
update next from masters current branch
2 parents 3885027 + 317450e commit 053ca27

File tree

7 files changed

+280
-9
lines changed

7 files changed

+280
-9
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [1.5.0](https://github.com/Airfooox/cron-validate/compare/v1.4.5...v1.5.0) (2025-03-13)
2+
3+
4+
### Bug Fixes
5+
6+
* **deps:** update dependency yup to v1 ([#274](https://github.com/Airfooox/cron-validate/issues/274)) ([f4a61e5](https://github.com/Airfooox/cron-validate/commit/f4a61e597d9a1b284d90dc779b065247943e6224))
7+
8+
9+
### Features
10+
11+
* add allowStepping option ([#290](https://github.com/Airfooox/cron-validate/issues/290)) ([f6a0c53](https://github.com/Airfooox/cron-validate/commit/f6a0c531058fbde7def3427dc55cce97db52c26d))
12+
* add check for non-integer numbers ([#291](https://github.com/Airfooox/cron-validate/issues/291)) ([2977282](https://github.com/Airfooox/cron-validate/commit/2977282ef989749230b3a3ebcb8d1d90953dc07a))
13+
* add check for second step number (max value, step range) ([#291](https://github.com/Airfooox/cron-validate/issues/291)) ([13e875b](https://github.com/Airfooox/cron-validate/commit/13e875b453a3efbec13fa97458034753405fb907))
14+
115
## [1.4.5](https://github.com/Airfooox/cron-validate/compare/v1.4.4...v1.4.5) (2022-11-20)
216

317

package-lock.json

Lines changed: 202 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"name": "cron-validate",
3-
"version": "1.4.5",
3+
"version": "1.5.2",
44
"description": "cron-validate is a cron-expression validator written in TypeScript.",
55
"scripts": {
66
"dev": "nodemon",
7-
"build": "tsc",
7+
"build": "tsc -p ./tsconfig.build.json",
88
"lint": "eslint src/**/*.ts",
99
"lint-fix": "eslint src/**/*.ts --fix",
1010
"prettier": "prettier --write src/**/*.ts",
1111
"tsc-check": "tsc --project ./tsconfig.json --noEmit",
1212
"release": "npm run build && env-cmd npx semantic-release --branches master --no-ci",
13+
"release-dry": "npm run build && env-cmd npx semantic-release --branches master --no-ci --dry-run",
1314
"release-next": "npm run build && env-cmd npx semantic-release --branches next --no-ci",
1415
"release-next-major": "npm run build && env-cmd npx semantic-release --branches next-major --no-ci",
1516
"test": "jest --coverage",
@@ -76,11 +77,24 @@
7677
"message": "chore(${branch.name}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
7778
}
7879
]
80+
],
81+
"prepare": [
82+
{
83+
"path": "@semantic-release/exec",
84+
"cmd": "npx tsx scripts/remove-type.ts"
85+
}
86+
],
87+
"success": [
88+
{
89+
"path": "@semantic-release/exec",
90+
"cmd": "npx tsx scripts/restore-type.ts"
91+
}
7992
]
8093
},
8194
"devDependencies": {
8295
"@semantic-release/changelog": "6.0.3",
8396
"@semantic-release/commit-analyzer": "9.0.2",
97+
"@semantic-release/exec": "7.0.3",
8498
"@semantic-release/git": "10.0.1",
8599
"@semantic-release/github": "8.1.0",
86100
"@semantic-release/release-notes-generator": "10.0.3",

scripts/remove-type.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { readFileSync, writeFileSync } from 'fs'
2+
3+
const packageJsonPath = './package.json'
4+
5+
// Read package.json
6+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
7+
8+
// Store the semantic-release-generated version to ensure it's preserved during the process
9+
// This prevents the version from reverting to an older value when modifying package.json
10+
const currentVersion = packageJson.version
11+
12+
// Remove "type" key for publishing
13+
delete packageJson.type
14+
15+
// Ensure the version is preserved
16+
packageJson.version = currentVersion
17+
18+
// Write back package.json without "type" field but with version preserved
19+
writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`)

scripts/restore-type.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { readFileSync, writeFileSync } from 'fs'
2+
3+
const packageJsonPath = './package.json'
4+
5+
// Read current package.json (with new version)
6+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
7+
8+
// Store the semantic-release-generated version to ensure it's preserved during the process
9+
// This prevents the version from reverting to an older value when modifying package.json
10+
const currentVersion = packageJson.version
11+
12+
// Add back the "type" field
13+
packageJson.type = 'module'
14+
15+
// Ensure the version is preserved
16+
packageJson.version = currentVersion
17+
18+
// Write back package.json with "type" field restored and version preserved
19+
writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`)

tsconfig.build.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "lib"
6+
},
7+
"include": ["src/**/*.ts"],
8+
"exclude": ["src/**/*.test.ts"]
9+
}

tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
{
22
"compilerOptions": {
33
"baseUrl": ".",
4-
"rootDir": "src",
5-
"outDir": "lib",
64
"lib": ["ESNext"],
75
"target": "ES2017", // ES2017 is 100% supported in node.js 8.10.0.
86
"module": "commonjs", // Node.js does not yet support es-modules.
97
"moduleResolution": "node",
10-
118
"declaration": true,
129
"skipLibCheck": true,
1310
"esModuleInterop": true,
1411
"strict": true,
1512
"noFallthroughCasesInSwitch": true,
1613
"importsNotUsedAsValues": "preserve"
1714
},
18-
"include": ["src/**/*.ts"],
15+
"include": ["src/**/*.ts", "scripts/**/*.ts"],
1916
"exclude": ["src/**/*.test.ts"]
2017
}

0 commit comments

Comments
 (0)