@@ -25643,6 +25643,7 @@ const ranges_1 = __nccwpck_require__(6507);
2564325643const tags_1 = __nccwpck_require__(130);
2564425644const resolutions_1 = __nccwpck_require__(8808);
2564525645const keys_1 = __nccwpck_require__(4315);
25646+ const alphabetical_1 = __nccwpck_require__(972);
2564625647const pathToPackageJson = './package.json';
2564725648exports.RULES_MAP = {
2564825649 ranges: {
@@ -25659,6 +25660,9 @@ exports.RULES_MAP = {
2565925660 keys: {
2566025661 method: keys_1.validateKeys,
2566125662 extraInput: pathToPackageJson
25663+ },
25664+ alphabetical: {
25665+ method: alphabetical_1.validateAlphabetical
2566225666 }
2566325667};
2566425668const run = () => {
@@ -25678,6 +25682,69 @@ exports.run = run;
2567825682(0, exports.run)();
2567925683
2568025684
25685+ /***/ }),
25686+
25687+ /***/ 972:
25688+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
25689+
25690+ "use strict";
25691+
25692+ /*
25693+ Copyright 2021 Expedia, Inc.
25694+ Licensed under the Apache License, Version 2.0 (the "License");
25695+ you may not use this file except in compliance with the License.
25696+ You may obtain a copy of the License at
25697+ https://www.apache.org/licenses/LICENSE-2.0
25698+ Unless required by applicable law or agreed to in writing, software
25699+ distributed under the License is distributed on an "AS IS" BASIS,
25700+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25701+ See the License for the specific language governing permissions and
25702+ limitations under the License.
25703+ */
25704+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25705+ if (k2 === undefined) k2 = k;
25706+ var desc = Object.getOwnPropertyDescriptor(m, k);
25707+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
25708+ desc = { enumerable: true, get: function() { return m[k]; } };
25709+ }
25710+ Object.defineProperty(o, k2, desc);
25711+ }) : (function(o, m, k, k2) {
25712+ if (k2 === undefined) k2 = k;
25713+ o[k2] = m[k];
25714+ }));
25715+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25716+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25717+ }) : function(o, v) {
25718+ o["default"] = v;
25719+ });
25720+ var __importStar = (this && this.__importStar) || function (mod) {
25721+ if (mod && mod.__esModule) return mod;
25722+ var result = {};
25723+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25724+ __setModuleDefault(result, mod);
25725+ return result;
25726+ };
25727+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25728+ exports.validateAlphabetical = void 0;
25729+ const core = __importStar(__nccwpck_require__(2186));
25730+ const get_dependencies_1 = __nccwpck_require__(4715);
25731+ const validateAlphabetical = (packageJson) => {
25732+ const dependencyTypes = (0, get_dependencies_1.getDependencyTypes)();
25733+ dependencyTypes.forEach(dependencyType => {
25734+ const dependencies = packageJson[dependencyType];
25735+ if (!dependencies) {
25736+ throw new Error(`${dependencyType} specified in dependency-types but missing in package.json`);
25737+ }
25738+ const sortedDependencies = Object.keys(dependencies).sort();
25739+ const isSorted = JSON.stringify(Object.keys(dependencies)) === JSON.stringify(sortedDependencies);
25740+ if (!isSorted) {
25741+ core.setFailed(`${dependencyType} in package.json are not sorted alphabetically.`);
25742+ }
25743+ });
25744+ };
25745+ exports.validateAlphabetical = validateAlphabetical;
25746+
25747+
2568125748/***/ }),
2568225749
2568325750/***/ 4315:
0 commit comments