Skip to content

node 23 default import bug #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [16, 18, 20, 22]
node-version: [18, 20, 22, 23]
# Not needed anymore/right now:
# include:
# - node-version: 14
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v18
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spectaql",
"version": "3.0.3",
"version": "4.0.0-beta.0",
"description": "A powerful library for autogenerating static GraphQL API documentation",
"author": "Anvil Foundry Inc. <hello@useanvil.com>",
"homepage": "https://github.com/anvilco/spectaql",
Expand All @@ -23,7 +23,7 @@
"generator"
],
"engines": {
"node": ">=16",
"node": ">=18",
"npm": ">=7"
},
"main": "index.js",
Expand Down Expand Up @@ -64,7 +64,7 @@
"test:watch": "nodemon -x 'npm test'",
"test:debug": "npm test --node-option inspect=0.0.0.0:9223",
"test:debug:watch": "nodemon -x 'npm run test:debug'",
"develop": "nodemon -x 'npm run clean-build && node bin/spectaql' -- -D",
"develop": "nodemon -x 'npm run clean-build && node --no-experimental-require-module bin/spectaql' -- -D",
"develop:deep-nesting": "npm run develop --theme-dir ./examples/themes/deep-nesting-data --config ./examples/config.yml",
"develop:echo-directive-sdl": "node dev/echoDirectiveSdl.mjs",
"test-e2e:build": "npm run clean-build && rimraf test/e2e/spectaql.tgz && node dev/build-e2e.mjs",
Expand Down
5 changes: 5 additions & 0 deletions src/spectaql/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ async function run(opts) {

const arrangeData = takeDefaultExport(arrangeDataModule)

console.log({
arrangeDataModule,
arrangeData,
})

const items = arrangeData({
introspectionResponse,
graphQLSchema,
Expand Down
1 change: 1 addition & 0 deletions src/spectaql/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function tmpFolder(options = {}) {
}

export function takeDefaultExport(mojule) {
mojule = mojule?.default ? mojule.default : mojule
return mojule?.default ? mojule.default : mojule
}

Expand Down
Loading