From d88d023a8d7693a41a2b5003fedf3af1e31feac0 Mon Sep 17 00:00:00 2001 From: Ethan Freestone Date: Wed, 15 Apr 2026 11:14:51 +0100 Subject: [PATCH 1/2] fix: Octokit usage Octokit is now an ESM module as of v21.0.0. stripes-cli has updated to v22 as of [this PR](https://github.com/folio-org/stripes-cli/pull/395) Brings the import into ESM patterns --- lib/environment/inventory.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/environment/inventory.js b/lib/environment/inventory.js index 4994a89b..18d3120b 100644 --- a/lib/environment/inventory.js +++ b/lib/environment/inventory.js @@ -1,6 +1,6 @@ const fs = require('fs-extra'); const path = require('path'); -const { Octokit } = require('@octokit/rest'); +//const { Octokit } = require('@octokit/rest'); const MODULE_CACHE_FILE = '/inventory.json'; @@ -32,7 +32,10 @@ function readModules() { } async function fetchAndStoreModules() { + const { Octokit } = await import('@octokit/rest'); + const octokit = new Octokit(); + const repos = { apps: [], libs: [], other: [], platforms: [], plugins: [] }; const options = octokit.repos.listForOrg.endpoint.merge({ org: 'folio-org', type: 'public' }); const data = await octokit.paginate(options); From b15ee4e3ce32d702bb3efe967ac1a5af72479179 Mon Sep 17 00:00:00 2001 From: Ethan Freestone Date: Wed, 15 Apr 2026 15:37:18 +0100 Subject: [PATCH 2/2] chore: Removed commented out code --- lib/environment/inventory.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/environment/inventory.js b/lib/environment/inventory.js index 18d3120b..2aa3fdf4 100644 --- a/lib/environment/inventory.js +++ b/lib/environment/inventory.js @@ -1,6 +1,5 @@ const fs = require('fs-extra'); const path = require('path'); -//const { Octokit } = require('@octokit/rest'); const MODULE_CACHE_FILE = '/inventory.json';