nxext / nx-extensions

Nx Extension for StencilJs, SvelteJS, SolidJS, Ionic and VueJs
MIT License
454 stars 99 forks source link

Sveltekit upgrade #980

Closed kristianmandrup closed 10 months ago

kristianmandrup commented 1 year ago

Have tried to upgrade the Sveltekit extension to use the latest Sveltekit and friends. Have also added a new page generator and expanded the application generator to include generation of a project.json file so that it can be used orchestrated directly via nx executor targets.

Have also improved the Readme with examples for all the nx targets included.

I had to temporarily disable the husky pre-push hook due to the following error:

Note this PR is a draft still as the changes have not ben thoroughly tesed

$ git push km sveltekit-upgrade -f
yarn run v1.22.19
warning ../../package.json: No license field
$ nx format:check
✨  Done in 1.19s.
yarn run v1.22.19
warning ../../package.json: No license field
$ ts-node -P tools/scripts/tsconfig.scripts.json ./tools/scripts/documentation/documentation.ts
/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
tools/scripts/documentation/schema-flattener.ts:47:19 - error TS2351: This expression is not constructable.
  Type 'typeof import("/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ajv/dist/ajv")' has no construct signatures.

47   const ajv = new Ajv({ passContext: true });
                     ~~~

    at createTSError (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/kristian/repos/personal/ai-projects/gpt-team/nx-extensions/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19) {
  diagnosticCodes: [ 2351 ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-push hook exited with code 1 (error)
paviln commented 11 months ago

Hello @DominikPieper Any reason this is not getting worked on? nx-sveltekit still on old version 14.0 of sveltekit, which is not usable anymore... Please 🩹

DominikPieper commented 11 months ago

@kristianmandrup how's the chance you work further on this soon? And if there's no time, could you rebase it on main and I could merge it into a branch an start from there?

DominikPieper commented 10 months ago

I'll move this to a seperate branch onto the Nxext repo and use it as a foundation for the Sveltekit upgrade

kristianmandrup commented 10 months ago

Hi @DominikPieper. Thanks for taking this further. I've been swamped with work and private matters lately. Expecting my 2nd son and new work, client etc. Cheers.

DominikPieper commented 10 months ago

Oh all the best. I know that’s a stressful time with newborns 😅 I’ll integrate your changes