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

Circular dependencies with TypeScript #348

Open
jwrosewell opened this issue Apr 26, 2022 · 7 comments
Open

Circular dependencies with TypeScript #348

jwrosewell opened this issue Apr 26, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@jwrosewell
Copy link

1.4.0

Core

When transpiling in TypeScript the following warning is generated.

(!) Circular dependencies
..\node_modules@iabtcf\core\lib\encoder\index.js -> ..\node_modules@iabtcf\core\lib\encoder\SegmentEncoder.js -> ..\node_modules@iabtcf\core\lib\encoder\field\index.js -> ..\node_modules@iabtcf\core\lib\encoder\field\FieldEncoderMap.js -> ..\node_modules@iabtcf\core\lib\encoder\field\VendorVectorEncoder.js -> ..\node_modules@iabtcf\core\lib\encoder\index.js
..\node_modules@iabtcf\core\lib\encoder\index.js -> ..\node_modules@iabtcf\core\lib\encoder\SegmentEncoder.js -> ..\node_modules@iabtcf\core\lib\encoder\field\index.js -> ..\node_modules@iabtcf\core\lib\encoder\field\FieldEncoderMap.js -> ..\node_modules@iabtcf\core\lib\encoder\field\VendorVectorEncoder.js -> D:\Workspace\paf-mvp-implementation\node_modules@iabtcf\core\lib\encoder\index.js?commonjs-proxy -> ..\node_modules@iabtcf\core\lib\encoder\index.js

The module is included with the following import.

import { TCString, TCModel, SegmentEncoder, Segment } from '@iabtcf/core/lib';

Do others have the same issue?

@jwrosewell jwrosewell added the bug Something isn't working label Apr 26, 2022
@apfritts
Copy link

yea, having the same issue. Did you have a chance to figure out how to fix it @jwrosewell?

@jwrosewell
Copy link
Author

Thanks for confirming. Not yet looked at solving it. I'm concerned it's interfering with treeshaking and resulting in larger than required modules.

@jwrosewell
Copy link
Author

Issues looks like it's related to this line.

I don't have the time to get a build environment working to make a PR. Others?

@marco-prontera
Copy link
Contributor

Hi @jwrosewell try the latest version 1.5.3 and tell me if there is still this problem.
Read CONTRIBUTING.md to know how to start with the project ;)

@krasnoperov
Copy link

In my case it is still there:

Imports:

import type { GVL as GVLType, TCModel as TCModelType } from '@iabtcf/core'
import { TCModel, TCString, GVL } from '@iabtcf/core'
import { CmpApi } from '@iabtcf/cmpapi'
import cmpstub from '@iabtcf/stub'

Build output:

(!) Circular dependencies
node_modules/@iabtcf/core/lib/mjs/encoder/index.js -> node_modules/@iabtcf/core/lib/mjs/encoder/SegmentEncoder.js -> node_modules/@iabtcf/core/lib/mjs/encoder/field/index.js -> node_modules/@iabtcf/core/lib/mjs/encoder/field/FieldEncoderMap.js -> node_modules/@iabtcf/core/lib/mjs/encoder/field/VendorVectorEncoder.js -> node_modules/@iabtcf/core/lib/mjs/encoder/index.js
node_modules/@iabtcf/cmpapi/lib/mjs/response/index.js -> node_modules/@iabtcf/cmpapi/lib/mjs/response/Disabled.js -> node_modules/@iabtcf/cmpapi/lib/mjs/response/Response.js -> node_modules/@iabtcf/cmpapi/lib/mjs/CmpApiModel.js -> node_modules/@iabtcf/cmpapi/lib/mjs/EventListenerQueue.js -> node_modules/@iabtcf/cmpapi/lib/mjs/command/GetTCDataCommand.js -> node_modules/@iabtcf/cmpapi/lib/mjs/response/index.js

@NevilleS
Copy link

NevilleS commented Mar 7, 2024

Yup, we see this too!

@iabtechlabtcf/core: version 1.5.10
@iabtechlabtcf/cmpapi: version 1.5.8

@HeinzBaumann
Copy link
Collaborator

-> @lamrowena

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants