Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0054990 | POS2 | POS | public | 2024-03-19 09:53 | 2024-04-05 10:26 |
Reporter | miguel_lopez | ||||
Assigned To | miguel_lopez | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
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 | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|