فهرست منبع

chore: update deps. and devDeps.

Brett Zamir 2 ماه پیش
والد
کامیت
c7fd464922
9فایلهای تغییر یافته به همراه638 افزوده شده و 650 حذف شده
  1. 0 2
      .eslintignore
  2. 0 23
      .eslintrc.cjs
  3. 1 0
      .npmignore
  4. 6 2
      api/controllers/bDateController.js
  5. 8 8
      api/routes/bDateRoutes.js
  6. 12 0
      eslint.config.js
  7. 9 25
      package.json
  8. 600 590
      pnpm-lock.yaml
  9. 2 0
      pnpm-workspace.yaml

+ 0 - 2
.eslintignore

@@ -1,2 +0,0 @@
-node_modules
-vendor

+ 0 - 23
.eslintrc.cjs

@@ -1,23 +0,0 @@
-'use strict';
-
-module.exports = {
-  extends: ['ash-nazg/sauron-node-overrides'],
-  parserOptions: {
-    ecmaVersion: 2022
-  },
-  settings: {
-    jsdoc: {
-      mode: 'typescript'
-    }
-  },
-  rules: {
-    'import/no-commonjs': 0,
-    'node/exports-style': 0,
-
-    // Browser
-    'compat/compat': 0,
-
-    // Prefer unicorn's version of the rule
-    'no-process-exit': 0
-  }
-};

+ 1 - 0
.npmignore

@@ -1 +1,2 @@
 pnpm-lock.yaml
+eslint.config.js

+ 6 - 2
api/controllers/bDateController.js

@@ -1,3 +1,4 @@
+/* eslint-disable camelcase -- Current API */
 import * as luxon from 'luxon';
 
 import {LocalBadiDate} from 'badidate';
@@ -35,8 +36,9 @@ function createDateObject (dte, {
 */
 function sanitizeTimeZone (tz) {
   try {
-    const timeZone = tz.replace(/ /gu, '_');
-    Intl.DateTimeFormat(undefined, {timeZone});
+    const timeZone = tz.replaceAll(' ', '_');
+    // eslint-disable-next-line no-new -- Testing
+    new Intl.DateTimeFormat(undefined, {timeZone});
     return timeZone;
   } catch (err) {
     // Will allow default above to be used
@@ -44,9 +46,11 @@ function sanitizeTimeZone (tz) {
   }
 }
 
+/* eslint-disable jsdoc/reject-any-type -- Arbitrary */
 /**
  * @typedef {any} ArbitraryArgumentToConvert
  */
+/* eslint-enable jsdoc/reject-any-type -- Arbitrary */
 
 /**
  * @param {ArbitraryArgumentToConvert} s

+ 8 - 8
api/routes/bDateRoutes.js

@@ -6,17 +6,17 @@ import * as bDate from '../controllers/bDateController.js';
  */
 function routes (app) {
   // API test
-  app.route('/test')
-    .get(bDate.test);
+  app.route('/test').
+    get(bDate.test);
   // Today's Badí' date
-  app.route('/today')
-    .post(bDate.today);
+  app.route('/today').
+    post(bDate.today);
   // Arbitrary Badí' date
-  app.route('/date')
-    .get(bDate.date);
+  app.route('/date').
+    get(bDate.date);
 
-  app.route('/today')
-    .get(bDate.todayHtml);
+  app.route('/today').
+    get(bDate.todayHtml);
 }
 
 export default routes;

+ 12 - 0
eslint.config.js

@@ -0,0 +1,12 @@
+import ashNazg from 'eslint-config-ash-nazg';
+
+export default [
+  {
+    ignores: ['vendor']
+  },
+  ...ashNazg(['sauron', 'node']),
+  {
+    rules: {
+    }
+  }
+];

+ 9 - 25
package.json

@@ -18,7 +18,7 @@
     "test": "echo \"Error: No test specified\" && exit 1"
   },
   "engines": {
-    "node": "^20.11.0 || >=22.0.0"
+    "node": "^20.11.0 || >=22.16.0"
   },
   "repository": {
     "type": "git",
@@ -39,33 +39,17 @@
   },
   "homepage": "https://github.com/dragfyre/bahai-date-api#readme",
   "devDependencies": {
-    "@brettz9/eslint-plugin": "^1.0.4",
     "command-line-publish": "^1.1.0",
-    "eslint": "^8.36.0",
-    "eslint-config-ash-nazg": "^34.8.0",
-    "eslint-config-standard": "^17.0.0",
-    "eslint-plugin-array-func": "^3.1.8",
-    "eslint-plugin-compat": "^4.1.2",
-    "eslint-plugin-eslint-comments": "^3.2.0",
-    "eslint-plugin-html": "^7.1.0",
-    "eslint-plugin-import": "^2.27.5",
-    "eslint-plugin-jsdoc": "^40.0.2",
-    "eslint-plugin-markdown": "^3.0.0",
-    "eslint-plugin-n": "^15.6.1",
-    "eslint-plugin-no-unsanitized": "^4.0.2",
-    "eslint-plugin-no-use-extend-native": "^0.5.0",
-    "eslint-plugin-promise": "^6.1.1",
-    "eslint-plugin-sonarjs": "^0.18.0",
-    "eslint-plugin-standard": "^4.1.0",
-    "eslint-plugin-unicorn": "^46.0.0",
-    "nodemon": "^2.0.21"
+    "eslint": "^9.38.0",
+    "eslint-config-ash-nazg": "^39.6.1",
+    "nodemon": "^3.1.10"
   },
   "dependencies": {
     "badidate": "^3.0.2",
-    "body-parser": "^1.20.2",
-    "command-line-basics": "^1.1.0",
-    "express": "^4.18.2",
-    "express-rate-limit": "^6.7.0",
-    "luxon": "^3.3.0"
+    "body-parser": "^2.2.0",
+    "command-line-basics": "^3.0.0",
+    "express": "^5.1.0",
+    "express-rate-limit": "^8.1.0",
+    "luxon": "^3.7.2"
   }
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 600 - 590
pnpm-lock.yaml


+ 2 - 0
pnpm-workspace.yaml

@@ -0,0 +1,2 @@
+ignoredBuiltDependencies:
+  - unrs-resolver

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است