Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: actions/setup-node@v6
with:
node-version: 24
node-version: 26

- run: npm clean-install

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [20, 22]
node-version: [24, 26]
runs-on: ${{ matrix.os }}

steps:
Expand Down
8 changes: 6 additions & 2 deletions lib/classes/eik-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class EikConfig {
if (configuredServer) {
return configuredServer;
}
return this[_tokens].keys().next().value;
return /** @type {string} */ (this[_tokens].keys().next().value);
}

/** @type {[string, string][]} */
Expand Down Expand Up @@ -153,7 +153,11 @@ export default class EikConfig {
? destination
: ensurePosix(join(destination, localFile.relative));
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),
),
);

const remoteDestination = new RemoteFileLocation(
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/config-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
* Load the configuration from an exact path and return an EikConfig object
*
* @param {string} configFilePathname
* @param {function} loadJSONFromDisk
* @param {(path: string) => any} loadJSONFromDisk
*
* @returns {EikConfig}
*/
Expand All @@ -57,7 +57,7 @@ export default {
* 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}
*/
Expand Down
9 changes: 5 additions & 4 deletions lib/helpers/fetch-import-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function fetchImportMaps(urls = []) {
}

let contentType = response.headers.get("content-type");
if (!contentType.startsWith("application/json")) {
if (!contentType || !contentType.startsWith("application/json")) {
const content = await response.text();
if (content.length === 0) {
throw new Error(
Expand All @@ -38,8 +38,9 @@ export async function fetchImportMaps(urls = []) {
});
return await Promise.all(maps);
} 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,
});
}
}
Loading
Loading