@eik/common
Advanced tools
+7
-0
@@ -0,1 +1,8 @@ | ||
| ## [5.1.28](https://github.com/eik-lib/common/compare/v5.1.27...v5.1.28) (2026-05-27) | ||
| ### Bug Fixes | ||
| * Bump dependencies ([#455](https://github.com/eik-lib/common/issues/455)) ([fca4cbb](https://github.com/eik-lib/common/commit/fca4cbb16af46cb058f3b3bbfca11d9bccd46d71)) | ||
| ## [5.1.27](https://github.com/eik-lib/common/compare/v5.1.26...v5.1.27) (2026-05-22) | ||
@@ -2,0 +9,0 @@ |
@@ -83,3 +83,3 @@ /** | ||
| } | ||
| return this[_tokens].keys().next().value; | ||
| return /** @type {string} */ (this[_tokens].keys().next().value); | ||
| } | ||
@@ -157,3 +157,7 @@ | ||
| const packagePathname = ensurePosix( | ||
| join(typeSlug(this.type), this.name, this.version), | ||
| join( | ||
| typeSlug(/** @type {string} */ (this.type)), | ||
| /** @type {string} */ (this.name), | ||
| /** @type {string} */ (this.version), | ||
| ), | ||
| ); | ||
@@ -160,0 +164,0 @@ |
@@ -35,3 +35,3 @@ import { readFileSync, writeFileSync } from "node:fs"; | ||
| * @param {string} configFilePathname | ||
| * @param {function} loadJSONFromDisk | ||
| * @param {(path: string) => any} loadJSONFromDisk | ||
| * | ||
@@ -61,3 +61,3 @@ * @returns {EikConfig} | ||
| * @param {string} configRootDir The base directory for the eik project. | ||
| * @param {function} [loadJSONFromDisk] The function to use to load the file from disk. | ||
| * @param {(path: string) => any} [loadJSONFromDisk] The function to use to load the file from disk. | ||
| * | ||
@@ -64,0 +64,0 @@ * @returns {EikConfig} |
@@ -24,3 +24,3 @@ /** | ||
| let contentType = response.headers.get("content-type"); | ||
| if (!contentType.startsWith("application/json")) { | ||
| if (!contentType || !contentType.startsWith("application/json")) { | ||
| const content = await response.text(); | ||
@@ -42,6 +42,7 @@ if (content.length === 0) { | ||
| } catch (err) { | ||
| throw new Error( | ||
| `Unable to load import map file from server: ${err.message}`, | ||
| ); | ||
| const message = err instanceof Error ? err.message : String(err); | ||
| throw new Error(`Unable to load import map file from server: ${message}`, { | ||
| cause: err, | ||
| }); | ||
| } | ||
| } |
+18
-12
| { | ||
| "name": "@eik/common", | ||
| "version": "5.1.27", | ||
| "version": "5.1.28", | ||
| "description": "Common utilities for Eik modules", | ||
@@ -15,2 +15,8 @@ "main": "lib/index.js", | ||
| ], | ||
| "tap": { | ||
| "exclude": [ | ||
| "test/**/*.d.ts", | ||
| "test/fixtures/**" | ||
| ] | ||
| }, | ||
| "scripts": { | ||
@@ -44,10 +50,10 @@ "clean": "rimraf .tap node_modules types", | ||
| "tinyglobby": "0.2.16", | ||
| "validate-npm-package-name": "7.0.2" | ||
| "validate-npm-package-name": "8.0.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/plugin-syntax-import-assertions": "7.28.6", | ||
| "@eik/eslint-config": "2.0.0", | ||
| "@eik/prettier-config": "1.0.1", | ||
| "@eik/semantic-release-config": "1.0.15", | ||
| "@eik/typescript-config": "1.0.1", | ||
| "@babel/plugin-syntax-import-assertions": "7.29.7", | ||
| "@eik/prettier-config": "1.0.2", | ||
| "@eik/semantic-release-config": "1.0.17", | ||
| "@eik/typescript-config": "1.0.2", | ||
| "@eik/eslint-config": "2.0.6", | ||
| "@semantic-release/changelog": "6.0.3", | ||
@@ -58,14 +64,14 @@ "@semantic-release/git": "10.0.1", | ||
| "@types/validate-npm-package-name": "4.0.2", | ||
| "eslint": "9.39.4", | ||
| "eslint": "10.4.0", | ||
| "express": "5.2.1", | ||
| "fastify": "5.8.5", | ||
| "json-schema-to-typescript": "15.0.4", | ||
| "npm-run-all2": "8.0.4", | ||
| "npm-run-all2": "9.0.1", | ||
| "prettier": "3.8.3", | ||
| "rimraf": "6.1.2", | ||
| "rimraf": "6.1.3", | ||
| "semantic-release": "25.0.3", | ||
| "stoppable": "1.1.0", | ||
| "tap": "21.5.0", | ||
| "typescript": "5.9.3" | ||
| "tap": "21.7.4", | ||
| "typescript": "6.0.3" | ||
| } | ||
| } |
| export default ReadFile; | ||
| declare const ReadFile: { | ||
| new ({ mimeType, etag }?: { | ||
| mimeType?: string; | ||
| etag?: string; | ||
| mimeType?: string | undefined; | ||
| etag?: string | undefined; | ||
| }): { | ||
@@ -7,0 +7,0 @@ _mimeType: string; |
@@ -6,7 +6,7 @@ declare namespace _default { | ||
| * @param {string} configFilePathname | ||
| * @param {function} loadJSONFromDisk | ||
| * @param {(path: string) => any} loadJSONFromDisk | ||
| * | ||
| * @returns {EikConfig} | ||
| */ | ||
| function loadFromPath(configFilePathname: string, loadJSONFromDisk?: Function): EikConfig; | ||
| function loadFromPath(configFilePathname: string, loadJSONFromDisk?: (path: string) => any): EikConfig; | ||
| /** | ||
@@ -16,7 +16,7 @@ * Tries to find the configuration for eik in the provided directory. | ||
| * @param {string} configRootDir The base directory for the eik project. | ||
| * @param {function} [loadJSONFromDisk] The function to use to load the file from disk. | ||
| * @param {(path: string) => any} [loadJSONFromDisk] The function to use to load the file from disk. | ||
| * | ||
| * @returns {EikConfig} | ||
| */ | ||
| function findInDirectory(configRootDir: string, loadJSONFromDisk?: Function): EikConfig; | ||
| function findInDirectory(configRootDir: string, loadJSONFromDisk?: (path: string) => any): EikConfig; | ||
| /** | ||
@@ -23,0 +23,0 @@ * Persist config changes to disk as <cwd>/eik.json |
92033
0.74%1716
0.29%+ Added
- Removed