@x-wp/semantic-release-config 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +18 -0
- package/dist/enums/index.js.map +1 -0
- package/dist/enums/package-type.enum.d.ts +4 -0
- package/dist/enums/package-type.enum.js +9 -0
- package/dist/enums/package-type.enum.js.map +1 -0
- package/dist/functions/generate-config.fn.d.ts +2 -0
- package/dist/functions/generate-config.fn.js +43 -0
- package/dist/functions/generate-config.fn.js.map +1 -0
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/index.js +18 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/index.d.ts +2 -0
- package/dist/interfaces/index.js +19 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/semantic-wp-config.interface.d.ts +5 -0
- package/dist/interfaces/semantic-wp-config.interface.js +3 -0
- package/dist/interfaces/semantic-wp-config.interface.js.map +1 -0
- package/dist/interfaces/wp-release-config.interface.d.ts +15 -0
- package/dist/interfaces/wp-release-config.interface.js +3 -0
- package/dist/interfaces/wp-release-config.interface.js.map +1 -0
- package/dist/services/generator.service.d.ts +9 -0
- package/dist/services/generator.service.js +107 -0
- package/dist/services/generator.service.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +18 -0
- package/dist/services/index.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Oblak Solutions
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './package-type.enum';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./package-type.enum"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PackageType = void 0;
|
4
|
+
var PackageType;
|
5
|
+
(function (PackageType) {
|
6
|
+
PackageType["Plugin"] = "plugin";
|
7
|
+
PackageType["Theme"] = "theme";
|
8
|
+
})(PackageType || (exports.PackageType = PackageType = {}));
|
9
|
+
//# sourceMappingURL=package-type.enum.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"package-type.enum.js","sourceRoot":"","sources":["../../lib/enums/package-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.generateConfig = void 0;
|
4
|
+
const enums_1 = require("../enums");
|
5
|
+
const services_1 = require("../services");
|
6
|
+
const defaults = {
|
7
|
+
branches: [
|
8
|
+
'master',
|
9
|
+
{
|
10
|
+
name: 'alpha',
|
11
|
+
prerelease: true,
|
12
|
+
},
|
13
|
+
{
|
14
|
+
name: 'beta',
|
15
|
+
prerelease: true,
|
16
|
+
},
|
17
|
+
],
|
18
|
+
commitOpts: {
|
19
|
+
preset: 'angular',
|
20
|
+
releaseRules: [
|
21
|
+
{ type: 'refactor', release: 'patch' },
|
22
|
+
{ type: 'style', release: 'patch' },
|
23
|
+
],
|
24
|
+
parserOpts: {
|
25
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
|
26
|
+
},
|
27
|
+
},
|
28
|
+
type: enums_1.PackageType.Plugin,
|
29
|
+
changelog: false,
|
30
|
+
releaseAsset: true,
|
31
|
+
wp: {
|
32
|
+
withVersionFile: true,
|
33
|
+
releasePath: '/tmp/wp-release',
|
34
|
+
versionFiles: [],
|
35
|
+
include: undefined,
|
36
|
+
exclude: undefined,
|
37
|
+
},
|
38
|
+
};
|
39
|
+
function generateConfig(config) {
|
40
|
+
return new services_1.Generator(defaults).generate(config);
|
41
|
+
}
|
42
|
+
exports.generateConfig = generateConfig;
|
43
|
+
//# sourceMappingURL=generate-config.fn.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generate-config.fn.js","sourceRoot":"","sources":["../../lib/functions/generate-config.fn.ts"],"names":[],"mappings":";;;AAAA,oCAAuC;AAEvC,0CAAwC;AAExC,MAAM,QAAQ,GAA2C;IACvD,QAAQ,EAAE;QACR,QAAQ;QACR;YACE,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,IAAI;SACjB;QACD;YACE,IAAI,EAAE,MAAM;YACZ,UAAU,EAAE,IAAI;SACjB;KACF;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;QACjB,YAAY,EAAE;YACZ,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE;YACtC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE;SACpC;QACD,UAAU,EAAE;YACV,YAAY,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;SACtD;KACF;IACD,IAAI,EAAE,mBAAW,CAAC,MAAM;IACxB,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,IAAI;IAClB,EAAE,EAAE;QACF,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,iBAAiB;QAC9B,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;KACnB;CACF,CAAC;AAEF,SAAgB,cAAc,CAC5B,MAAgC;IAEhC,OAAO,IAAI,oBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAJD,wCAIC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './generate-config.fn';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./generate-config.fn"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PackageType = void 0;
|
4
|
+
const generate_config_fn_1 = require("./functions/generate-config.fn");
|
5
|
+
const enums_1 = require("./enums");
|
6
|
+
Object.defineProperty(exports, "PackageType", { enumerable: true, get: function () { return enums_1.PackageType; } });
|
7
|
+
exports.default = generate_config_fn_1.generateConfig;
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAEhE,mCAAsC;AAEM,4FAFnC,mBAAW,OAEmC;AACvD,kBAAe,mCAAc,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./semantic-wp-config.interface"), exports);
|
18
|
+
__exportStar(require("./wp-release-config.interface"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,gEAA8C"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"semantic-wp-config.interface.js","sourceRoot":"","sources":["../../lib/interfaces/semantic-wp-config.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { BranchSpec } from 'semantic-release';
|
2
|
+
import { PackageType } from '../enums/package-type.enum';
|
3
|
+
import { PluginConfig } from '@semantic-release/wordpress/dist/classes/plugin-config.class';
|
4
|
+
export interface WpReleaseConfig {
|
5
|
+
branches: BranchSpec[];
|
6
|
+
commitOpts?: {
|
7
|
+
[key: string]: unknown;
|
8
|
+
};
|
9
|
+
type: PackageType;
|
10
|
+
name: string;
|
11
|
+
slug: string;
|
12
|
+
changelog?: string | false;
|
13
|
+
releaseAsset?: boolean;
|
14
|
+
wp: Partial<PluginConfig>;
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"wp-release-config.interface.js","sourceRoot":"","sources":["../../lib/interfaces/wp-release-config.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { SemanticWpConfig, WpReleaseConfig } from '../interfaces';
|
2
|
+
export declare class Generator {
|
3
|
+
private readonly defaults;
|
4
|
+
constructor(defaults: Omit<WpReleaseConfig, 'name' | 'slug'>);
|
5
|
+
generate(pkgConf: Partial<WpReleaseConfig>): SemanticWpConfig;
|
6
|
+
private parsePkgConfig;
|
7
|
+
private deslugify;
|
8
|
+
private pathExists;
|
9
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.Generator = void 0;
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
9
|
+
class Generator {
|
10
|
+
defaults;
|
11
|
+
constructor(defaults) {
|
12
|
+
this.defaults = defaults;
|
13
|
+
}
|
14
|
+
generate(pkgConf) {
|
15
|
+
const { wp, branches, ...cfg } = this.parsePkgConfig(pkgConf);
|
16
|
+
const srConfig = {
|
17
|
+
branches: branches,
|
18
|
+
plugins: [],
|
19
|
+
};
|
20
|
+
if (cfg.changelog !== false) {
|
21
|
+
srConfig.plugins.push([
|
22
|
+
'@semantic-release/changelog',
|
23
|
+
{
|
24
|
+
changelogFile: cfg.changelog,
|
25
|
+
},
|
26
|
+
]);
|
27
|
+
}
|
28
|
+
srConfig.plugins.push([
|
29
|
+
'@semantic-release/commit-analyzer',
|
30
|
+
cfg.commitOpts,
|
31
|
+
]);
|
32
|
+
srConfig.plugins.push('@semantic-release/release-notes-generator');
|
33
|
+
if (cfg.changelog !== false) {
|
34
|
+
srConfig.plugins.push([
|
35
|
+
'@semantic-release/git',
|
36
|
+
{
|
37
|
+
assets: [cfg.changelog],
|
38
|
+
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
39
|
+
},
|
40
|
+
]);
|
41
|
+
}
|
42
|
+
srConfig.plugins.push(['@semantic-release/wordpress', wp]);
|
43
|
+
const assetName = cfg.type === 'plugin' ? cfg.slug : `${cfg.slug}-theme`;
|
44
|
+
const assetLabel = cfg.type === 'plugin' ? cfg.name : `${cfg.name} Theme`;
|
45
|
+
const ghAssets = [
|
46
|
+
{
|
47
|
+
path: node_path_1.default.join(wp.releasePath, 'package.zip'),
|
48
|
+
label: assetLabel + ' v${nextRelease.version}',
|
49
|
+
name: assetName + '-${nextRelease.version}.zip',
|
50
|
+
},
|
51
|
+
];
|
52
|
+
if (wp.withAssets) {
|
53
|
+
ghAssets.push({
|
54
|
+
path: node_path_1.default.join(wp.releasePath, 'assets.zip'),
|
55
|
+
label: assetLabel + ' Assets v${nextRelease.version}',
|
56
|
+
name: assetName + '-assets-${nextRelease.version}.zip',
|
57
|
+
});
|
58
|
+
}
|
59
|
+
srConfig.plugins.push([
|
60
|
+
'@semantic-release/github',
|
61
|
+
{
|
62
|
+
assets: ghAssets,
|
63
|
+
},
|
64
|
+
]);
|
65
|
+
console.log(JSON.stringify(srConfig, null, 2));
|
66
|
+
return srConfig;
|
67
|
+
}
|
68
|
+
parsePkgConfig({ name, slug, wp, changelog, ...config }) {
|
69
|
+
const def = this.defaults;
|
70
|
+
slug = slug || node_path_1.default.basename(process.cwd());
|
71
|
+
name = name || this.deslugify(slug);
|
72
|
+
changelog = changelog || def.changelog;
|
73
|
+
if (typeof changelog !== 'string' && changelog !== false) {
|
74
|
+
changelog = 'CHANGELOG.md';
|
75
|
+
}
|
76
|
+
return {
|
77
|
+
name: name,
|
78
|
+
slug: slug,
|
79
|
+
branches: config.branches || def.branches,
|
80
|
+
type: config.type || def.type,
|
81
|
+
changelog: changelog,
|
82
|
+
releaseAsset: config.releaseAsset || def.releaseAsset,
|
83
|
+
commitOpts: config.commitOpts || def.commitOpts,
|
84
|
+
wp: {
|
85
|
+
slug: slug,
|
86
|
+
withAssets: wp?.withAssets || this.pathExists('.wordpress-org', 'assets'),
|
87
|
+
withReadme: wp?.withReadme || this.pathExists('.wordpress-org', 'readme.txt'),
|
88
|
+
withVersionFile: wp?.withVersionFile || def.wp.withVersionFile,
|
89
|
+
versionFiles: wp?.versionFiles || def.wp.versionFiles,
|
90
|
+
include: wp?.include || def.wp.include,
|
91
|
+
exclude: wp?.exclude || def.wp.exclude,
|
92
|
+
releasePath: wp?.releasePath || def.wp.releasePath,
|
93
|
+
},
|
94
|
+
};
|
95
|
+
}
|
96
|
+
deslugify(slug) {
|
97
|
+
return slug
|
98
|
+
.split('-')
|
99
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
100
|
+
.join(' ');
|
101
|
+
}
|
102
|
+
pathExists(...filePath) {
|
103
|
+
return fs_extra_1.default.existsSync(node_path_1.default.posix.resolve(process.cwd(), ...filePath));
|
104
|
+
}
|
105
|
+
}
|
106
|
+
exports.Generator = Generator;
|
107
|
+
//# sourceMappingURL=generator.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generator.service.js","sourceRoot":"","sources":["../../lib/services/generator.service.ts"],"names":[],"mappings":";;;;;;AACA,0DAA6B;AAC7B,wDAA0B;AAG1B,MAAa,SAAS;IAED;IADnB,YACmB,QAAgD;QAAhD,aAAQ,GAAR,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AI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC;IACvE,CAAC;CACF;AA3HD,8BA2HC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './generator.service';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./generator.service"), exports);
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
package/package.json
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"name": "@x-wp/semantic-release-config",
|
3
|
+
"version": "1.3.0",
|
4
|
+
"license": "MIT",
|
5
|
+
"author": "Sibin Grasic <sibin.grasic@oblak.studio> (https://oblak.studio)",
|
6
|
+
"contributors": [],
|
7
|
+
"repository": "github:x-wp/semantic-wp-config",
|
8
|
+
"bugs": "https://githu.com/x-wp/semantic-wp-config/issues",
|
9
|
+
"keywords": [],
|
10
|
+
"scripts": {
|
11
|
+
"build": "rimraf dist && tsc",
|
12
|
+
"watch": "rimraf dist && tsc --watch",
|
13
|
+
"build:production": "rimraf dist && tsc --project tsconfig.build.json",
|
14
|
+
"lint": "eslint lib/*.ts",
|
15
|
+
"test": "jest",
|
16
|
+
"test:watch": "jest --watch",
|
17
|
+
"test:cov": "jest --coverage",
|
18
|
+
"release:test": "semantic-release --dry-run",
|
19
|
+
"release": "semantic-release"
|
20
|
+
},
|
21
|
+
"engines": {
|
22
|
+
"node": ">= 18"
|
23
|
+
},
|
24
|
+
"main": "dist/index.js",
|
25
|
+
"types": "dist/index.d.ts",
|
26
|
+
"dependencies": {
|
27
|
+
"fs-extra": "^11.2.0"
|
28
|
+
},
|
29
|
+
"devDependencies": {
|
30
|
+
"@semantic-release/wordpress": "^1.6.1",
|
31
|
+
"@types/fs-extra": "^11.0.4",
|
32
|
+
"@types/jest": "^29.5.3",
|
33
|
+
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
34
|
+
"@typescript-eslint/parser": "^6.2.0",
|
35
|
+
"eslint": "^8.45.0",
|
36
|
+
"eslint-config-prettier": "^8.9.0",
|
37
|
+
"eslint-plugin-prettier": "^5.0.0",
|
38
|
+
"jest": "^29.6.2",
|
39
|
+
"prettier": "^3.0.0",
|
40
|
+
"rimraf": "^5.0.1",
|
41
|
+
"semantic-release": "^22",
|
42
|
+
"ts-jest": "^29.1.1",
|
43
|
+
"typescript": "^5.1.6"
|
44
|
+
},
|
45
|
+
"publishConfig": {
|
46
|
+
"access": "public",
|
47
|
+
"provenance": true
|
48
|
+
}
|
49
|
+
}
|