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

Import from ../dataMap in dataMap/index is incorrectly resolving in Liferay's tool #8704

Closed
mrpiotr-dev opened this issue Sep 8, 2021 · 1 comment · Fixed by #8709
Closed

Comments

@mrpiotr-dev
Copy link
Contributor

Description

Currently, our dataMap/index reexports DataMap class from the upper directory (by importing it from ../dataMap).
Some tools, such as Liferay used by our clients, interpret ../dataMap, as a reference to the directory not to file:

./core
  import { ... , DataMap } from './dataMap/index'

./dataMap/index
  import DataMap from '../dataMap' // translated as `../dataMap/index`

../dataMap/index has no default export, ending with the hidden problem in ./core because DataMap will be undefined.

Then, when Handsontable initializes a new instance, the load() method tries to create a new undefined.

Steps to reproduce

  1. Build package including Handsontable using liferay-npm-bundler with presets for angular
  2. Deploy *.jar package as a Liferay's portlet

There are no demo - either steps to reproduce requires the whole env to run, and supposedly we will not be able to reproduce that issue.

Client's environment

  • Handsontable version: 8.4.0+
  • Browser Name and version: any
  • Operating System: any
  • node: 10.24.1
  • npm: 6.14.12
@mrpiotr-dev mrpiotr-dev self-assigned this Sep 8, 2021
mrpiotr-dev added a commit that referenced this issue Sep 9, 2021
…sts paths in unit tests and mentions in comments.
mrpiotr-dev added a commit that referenced this issue Sep 9, 2021
@mrpiotr-dev mrpiotr-dev linked a pull request Sep 9, 2021 that will close this issue
2 tasks
mrpiotr-dev added a commit that referenced this issue Sep 10, 2021
* #8704 - Moves './src/dataMap.js' into './src/dataMap' directory. Adjusts paths in unit tests and mentions in comments.

* #8704 - Adds the changelog file

* Apply suggestions from code review

Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com>

* Adjusts imports order

Co-authored-by: Krzysztof Budnik <571316+budnix@users.noreply.github.com>
@aninde
Copy link
Contributor

aninde commented Sep 29, 2021

This issue will be fixed by v10. Tested locally.

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

Successfully merging a pull request may close this issue.

3 participants