Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0054990 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [POS2] POS | minor | have not tried | 2024-03-19 09:53 | 2024-04-05 10:26 | |||||||
Reporter | miguel_lopez | View Status | public | |||||||||
Assigned To | miguel_lopez | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0054990: Portugal Fiscalization module uses "require('node-forge')" and does not provide it in a package.json | |||||||||||
Description | org.openbravo.localization.portugal.fiscalization module is supposed to support pos2, posterminal and graalJS. As part of its pos2 support, this “require('node-forge')” line was added in Utils.js: This works right now because node-forge is provided in core2 through a transitive dependency from webpack-dev-server, through selfsigned transitive dependency, this is not even intended, it should be provided by the portugal.fiscalization module. As part of the migration from CRA to Vite we can’t use “require()“, instead static or dynamic imports are preferred. There are other modules who had to add dependencies and support both oldPOS and pos2, to achieve that, they usually follow these steps: Have a dual module, creating an web-jspack folder and including a package.json with the required dependency Create an implementation for core2 specifically in the web-jspack/module/src folder. Provide the required dependencies in the package.json + its generated package-lock.json An example of this is the camerabarcodescanner module: It includes a library for old POS, and an implementation It includes a web-jspack with the dependency and an implementation for core2 We should implement something similar for the portugal fiscalization module to be correct and work. Right now is very fragile, because it depends on that transitive dependency and uses require instead of import. | |||||||||||
Steps To Reproduce | N/A | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0162330) hgbot (developer) 2024-03-19 10:11 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.localization.portugal.fiscalization/-/merge_requests/62 [^] |
(0162588) hgbot (developer) 2024-03-25 12:20 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1516 [^] |
(0162875) hgbot (developer) 2024-04-05 10:26 |
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1516 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2024-03-19 09:53 | miguel_lopez | New Issue | |
2024-03-19 09:53 | miguel_lopez | Assigned To | => miguel_lopez |
2024-03-19 09:53 | miguel_lopez | Triggers an Emergency Pack | => No |
2024-03-19 10:11 | hgbot | Note Added: 0162330 | |
2024-03-25 12:20 | hgbot | Note Added: 0162588 | |
2024-04-05 10:26 | hgbot | Note Added: 0162875 |
Copyright © 2000 - 2009 MantisBT Group |