Skip to content
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

Use package.json exports in Electron-auth #6739

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft

Conversation

hl662
Copy link
Contributor

@hl662 hl662 commented May 21, 2024

Update @itwin/electron-authorization to ^0.19.2
Rush build compiled successfully, but rush cover throws the following error in core-full-stack-tests:

Package subpath './Main' is not defined by "exports" in /Users/hoangnamle/Documents/itwinjs-core/full-stack-tests/core/node_modules/@itwin/electron-authorization/package.json imported from /Users/hoangnamle/Documents/itwinjs-core/full-stack-tests/core/lib/backend/backend.js
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './Main' is not defined by "exports" in /Users/hoangnamle/Documents/itwinjs-core/full-stack-tests/core/node_modules/@itwin/electron-authorization/package.json imported from /Users/hoangnamle/Documents/itwinjs-core/full-stack-tests/core/lib/backend/backend.js
    at exportsNotFound (node:internal/modules/esm/resolve:303:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:593:13)
    at packageResolve (node:internal/modules/esm/resolve:836:14)
    at moduleResolve (node:internal/modules/esm/resolve:910:20)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

Some important changes regarding core-full-stack-tests:
Updated tsconfig.json to include:

    "module": "ESNext",
    "moduleResolution": "Bundler",

And also updated package.json to have a type: module field.

@hl662
Copy link
Contributor Author

hl662 commented May 21, 2024

A follow up PR from #6058

@@ -1,6 +1,8 @@
{
"extends": "./node_modules/@itwin/build-tools/tsconfig-base.json",
"compilerOptions": {
"module": "ESNext",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you look at seeing if applying these tsconfig settings would help:

    "resolvePackageJsonExports": true /* Use the package.json 'exports' field when resolving package imports. */,
    "resolvePackageJsonImports": true /* Use the package.json 'imports' field when resolving imports. */,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it didn't work - typescript docs mentions they should already be enabled by default, because the moduleResolution in our tsconfig is Bundler

imodeljs-admin and others added 25 commits June 3, 2024 15:07
* Improved formatting and documentations of PolyfaceQuery.ts.
* Improved behavior of dihedralAngleSummary and isConvexByDihedralAngleCount functions and fixed tests accordingly.
* Added md doc for polyface dihedral angles.
* Improved tests.
Co-authored-by: Eric Paquet <EricPaquetB@users.noreply.github.com>
Co-authored-by: pmconne <22944042+pmconne@users.noreply.github.com>
Co-authored-by: imodeljs-admin <38288322+imodeljs-admin@users.noreply.github.com>
…d Profile Upgrades (#6692)

Co-authored-by: Affan Khan <khanaffan@users.noreply.github.com>
Co-authored-by: Arun George <11051042+aruniverse@users.noreply.github.com>
Co-authored-by: imodeljs-admin <38288322+imodeljs-admin@users.noreply.github.com>
Co-authored-by: = <andremig-bentley@users.noreply.github.com>
Co-authored-by: danieliborra <107669762+danieliborra@users.noreply.github.com>
Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com>
Co-authored-by: Arun George <aruniverse@users.noreply.github.com>
hl662 and others added 13 commits June 3, 2024 15:11
Co-authored-by: Arun George <11051042+aruniverse@users.noreply.github.com>
Co-authored-by: affank <khanaffan@gmail.com>
Co-authored-by: mcote01 <mcote01@users.noreply.github.com>
Co-authored-by: Arun George <11051042+aruniverse@users.noreply.github.com>
Co-authored-by: Nam Le <50554904+hl662@users.noreply.github.com>
Co-authored-by: Raphaël LEMIEUX <1904889+raplemie@users.noreply.github.com>
Co-authored-by: Arun George <11051042+aruniverse@users.noreply.github.com>
Co-authored-by: imodeljs-admin <38288322+imodeljs-admin@users.noreply.github.com>
@hl662
Copy link
Contributor Author

hl662 commented Jun 3, 2024

/azp run iTwin.js

Copy link

Pull request contains merge conflicts.

@hl662
Copy link
Contributor Author

hl662 commented Jun 3, 2024

/azp run iTwin.js

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet