@dpuse/dpuse-development 0.3.563 → 0.3.564

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-development",
3
- "version": "0.3.563",
3
+ "version": "0.3.564",
4
4
  "private": false,
5
5
  "description": "Actions for managing DPUse projects.",
6
6
  "license": "MIT",
@@ -33,13 +33,7 @@
33
33
  ".markdownlint.json",
34
34
  ".prettierrc.json",
35
35
  "dist",
36
- "eslint.config.ts",
37
- "LICENSE",
38
- "licenses/license-report-config.json",
39
- "tsconfig.json",
40
- "tsconfig.vite.json",
41
- "vite.config.ts",
42
- "vitest.config.ts"
36
+ "LICENSE"
43
37
  ],
44
38
  "engines": {
45
39
  "node": ">=22",
@@ -52,7 +46,7 @@
52
46
  "scripts": {
53
47
  "audit": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.auditDependencies())\"",
54
48
  "build": "vite build",
55
- "check": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.checkDependencies())\"",
49
+ "check": "node -e \"import('@dpuse/dpuse-development').then(m => m.checkConfigFiles())\" && node -e \"import('./dist/dpuse-development.es.js').then(m => m.checkDependencies())\"",
56
50
  "document": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.documentDependencies(['Apache-2.0;MIT']))\"",
57
51
  "format": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.formatCode())\"",
58
52
  "lint": "node -e \"import('./dist/dpuse-development.es.js').then(m => m.lintCode())\"",
package/eslint.config.ts DELETED
@@ -1,73 +0,0 @@
1
- // ── External Dependencies & Registrations
2
- import type { Linter } from 'eslint';
3
- import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';
4
- import { flatConfigs as pluginImportFlatConfigs } from 'eslint-plugin-import-x';
5
- import { configs as pluginRegexpConfigs } from 'eslint-plugin-regexp';
6
- import pluginSecurity from 'eslint-plugin-security';
7
- import pluginSonarJS from 'eslint-plugin-sonarjs';
8
- import pluginUnicorn from 'eslint-plugin-unicorn';
9
- import skipFormatting from 'eslint-config-prettier';
10
- import tseslint from 'typescript-eslint';
11
- import { defineConfig, globalIgnores } from 'eslint/config';
12
-
13
- // ── ESLint Configuration ─────────────────────────────────────────────────────────────────────────────────────────────
14
-
15
- export default defineConfig(
16
- // Linting scope, strict TypeScript type-checking, and module resolver.
17
- {
18
- files: ['eslint.config.ts', 'src/**/*.ts', 'vite.config.ts', 'vitest.config.ts'],
19
- extends: [...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
20
- languageOptions: {
21
- parserOptions: { project: './tsconfig.json' }
22
- },
23
- settings: {
24
- 'import-x/core-modules': ['cloudflare:workers'],
25
- 'import-x/resolver': {
26
- typescript: { project: ['./tsconfig.json'] }
27
- }
28
- }
29
- },
30
-
31
- // Ignores.
32
- globalIgnores(['bundle-analysis-reports/**', 'dependency-check-bin/**', 'dependency-check-reports/**', 'dist/**', 'licenses/**']),
33
-
34
- // Plugin configurations.
35
- {
36
- // '@eslint-community/eslint-comments' only ships a legacy config; manually convert to flat format.
37
- plugins: { '@eslint-community/eslint-comments': pluginComments },
38
- rules: {
39
- '@eslint-community/eslint-comments/disable-enable-pair': 'error',
40
- '@eslint-community/eslint-comments/no-aggregating-enable': 'error',
41
- '@eslint-community/eslint-comments/no-duplicate-disable': 'error',
42
- '@eslint-community/eslint-comments/no-unlimited-disable': 'error',
43
- '@eslint-community/eslint-comments/no-unused-enable': 'error'
44
- }
45
- },
46
- pluginImportFlatConfigs.recommended,
47
- pluginRegexpConfigs['flat/recommended'],
48
- pluginSecurity.configs.recommended,
49
- (pluginSonarJS.configs?.['recommended'] ?? {}) as Linter.Config,
50
- pluginUnicorn.configs.recommended,
51
- skipFormatting,
52
-
53
- // Rule overrides.
54
- {
55
- rules: {
56
- 'sort-imports': ['warn', { allowSeparatedGroups: true, ignoreCase: true, memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'] }],
57
-
58
- '@typescript-eslint/no-unused-vars': 'warn',
59
-
60
- '@eslint-community/eslint-comments/require-description': 'warn',
61
-
62
- 'sonarjs/no-commented-code': 'warn',
63
- 'sonarjs/no-dead-store': 'warn',
64
- 'sonarjs/no-unused-vars': 'warn',
65
- 'sonarjs/todo-tag': 'warn',
66
-
67
- 'unicorn/filename-case': ['error', { cases: { camelCase: true, pascalCase: true }, ignore: ['updateDPUseDependencies'] }],
68
- 'unicorn/no-null': 'off',
69
- 'unicorn/no-process-exit': 'off', // This package only contains scripts that are run as package.json scripts.
70
- 'unicorn/switch-case-braces': ['warn', 'avoid']
71
- }
72
- }
73
- );
package/tsconfig.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "declaration": true,
4
- "esModuleInterop": true,
5
- "exactOptionalPropertyTypes": true,
6
- "forceConsistentCasingInFileNames": true,
7
- "incremental": true,
8
- "isolatedModules": true,
9
- "lib": ["DOM", "ESNext"],
10
- "module": "ESNext",
11
- "moduleDetection": "force",
12
- "moduleResolution": "bundler",
13
- "noImplicitAny": true,
14
- "noImplicitOverride": true,
15
- "noPropertyAccessFromIndexSignature": true,
16
- "noUncheckedIndexedAccess": true,
17
- "noUnusedLocals": false,
18
- "noUnusedParameters": false,
19
- "outDir": "dist",
20
- "paths": {
21
- "~/*": ["./*"],
22
- "@/*": ["./src/*"]
23
- },
24
- "resolveJsonModule": true,
25
- "skipLibCheck": true,
26
- "sourceMap": true,
27
- "strict": true,
28
- "strictNullChecks": true,
29
- "target": "ESNext",
30
- "tsBuildInfoFile": "./node_modules/.cache/tsconfig.tsbuildinfo",
31
- "useDefineForClassFields": true
32
- },
33
- "include": ["eslint.config.ts", "src/**/*.ts", "tests/**/*.ts", "vite.config.*", "vitest.config.*"]
34
- }
package/vite.config.ts DELETED
@@ -1,56 +0,0 @@
1
- /**
2
- * Vite configuration.
3
- */
4
-
5
- // Dependencies - Vendor.
6
- import { defineConfig } from 'vite'; // Core Vite API.
7
- import dts from 'vite-plugin-dts'; // Emit .d.ts files alongside the bundle.
8
- import Sonda from 'sonda/vite'; // Visualize bundle results with Sonda plugin.
9
- import { visualizer } from 'rollup-plugin-visualizer'; // Generate bundle size report.
10
- import { fileURLToPath, URL } from 'node:url'; // ESM-safe path helpers.
11
-
12
- // Dependencies - Data.
13
- import config from './config.json' with { type: 'json' }; // Provide configuration identifier for naming.
14
-
15
- // Exposures - Configuration.
16
- export default defineConfig({
17
- build: {
18
- lib: {
19
- entry: fileURLToPath(new URL('src/index.ts', import.meta.url)), // Absolute entry path.
20
- fileName: (format) => `${config.id}.${format}.js`, // Bundle name derived from config identifier and format.
21
- formats: ['es'] // Only emit native ES modules.
22
- },
23
- rollupOptions: {
24
- external: ['node:child_process', 'node:fs', 'node:path', 'node:readline', 'node:url', 'node:util'], // Keep runtime dependencies out of bundle.
25
- onwarn(warning, warn) {
26
- if (warning.code === 'INVALID_ANNOTATION' && warning.id?.includes('acorn-typescript')) return;
27
- warn(warning);
28
- },
29
- plugins: [
30
- Sonda({
31
- filename: 'index', // Output file name.
32
- format: 'html', // Output file format.
33
- gzip: true, // Include gzip sizes.
34
- brotli: true, // Include brotli sizes.
35
- open: false, // Do not auto-open browser post-build.
36
- outputDir: './bundle-analysis-reports/sonda' // Output directory.
37
- }), // Run Sonda analyser to generate additional bundle insights.
38
- visualizer({
39
- filename: './bundle-analysis-reports/rollup-visualiser/index.html', // Output file path.
40
- open: false, // Do not auto-open browser post-build.
41
- gzipSize: true, // Include gzip sizes.
42
- brotliSize: true // Include brotli sizes.
43
- })
44
- ]
45
- },
46
- sourcemap: true,
47
- target: 'ESNext' // Emit modern JavaScript for consumers.
48
- },
49
- plugins: [dts({ outDirs: 'dist/types' })], // Generate type declarations in dist/types.
50
- resolve: {
51
- alias: {
52
- '~': fileURLToPath(new URL('./', import.meta.url)), // Base alias matching tsconfig.
53
- '@': fileURLToPath(new URL('src', import.meta.url)) // Source alias matching tsconfig.
54
- }
55
- }
56
- });
package/vitest.config.ts DELETED
@@ -1,21 +0,0 @@
1
- /**
2
- * Vitest configuration.
3
- */
4
-
5
- // Dependencies - Vendor.
6
- import { defineConfig } from 'vitest/config';
7
- import path from 'node:path';
8
-
9
- // Exposures - Configuration.
10
- export default defineConfig({
11
- resolve: {
12
- alias: {
13
- '@': path.resolve(__dirname, './src')
14
- }
15
- },
16
- test: {
17
- globals: true,
18
- include: ['tests/**/*.test.ts'],
19
- environment: 'node'
20
- }
21
- });