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

[v11] missing style package export for webpack based asset pipelines #1184

Closed
tagliala opened this issue Aug 30, 2024 · 7 comments · Fixed by #1193
Closed

[v11] missing style package export for webpack based asset pipelines #1184

tagliala opened this issue Aug 30, 2024 · 7 comments · Fixed by #1193
Labels

Comments

@tagliala
Copy link
Contributor

tagliala commented Aug 30, 2024

Describe the bug

Hello, I'm trying to upgrade a working app using shakapacker (a pre-processor based on webpack) to Choices v11 but I'm getting an error related to scss import

When updating from Choices.js 10 to Choices.js 11, shakapacker is not able
to resolve

  • @import "choices.js/src/styles/choices"; in Scss
  • import "choices.js/public/assets/styles/choices.css"; in JS

This is due to the new exports entry in package.json, which require
specific entries for webpack, such as style

To Reproduce

Tools and versions required to replicate

  • npm 10.8.0
  • Shakapacker 7/8
  • Node 20.15.0
  • Ruby 3.3.4 (should not be relevant)
  • Rails 7.2.1 (anything >= 6.1.0 should not be relevant)

Initial app

rails _7.2.1_ new test-choices-package-exports --skip-active-record --skip-javascript --skip-git --skip-test
cd test-choices-package-exports
echo "{ \"private\": true, \"packageManager\": \"npm@10.8.2\" }" > package.json
echo "gem 'shakapacker', '8.0.2'" >> Gemfile
bundle
rails shakapacker:install
npm add css-loader style-loader mini-css-extract-plugin css-minimizer-webpack-plugin
npm add choices.js@10.2.0
echo "module.exports = { plugins: [require('postcss-import')] }" > postcss.config.js
git add .
git commit -am "First commit"
git branch tests/scss main
git branch tests/css main

CSS import from JavaScript

git checkout tests/css
echo "import \"choices.js/public/assets/styles/choices.css\";" >> app/javascript/packs/application.js
git commit -am "CSS test"
bin/shakapacker # WORKS, CSS OUTPUT PRESENT
npm add choices.js@^11.0.0
bin/shakapacker # DOES NOT WORK

Error:

ERROR in ./app/javascript/packs/application.js 16:0-53
Module not found: Error: Package path ./public/assets/styles/choices.css is not exported from package ./node_modules/choices.js (see exports field in ./node_modules/choices.js/package.json)

Sass

git checkout tests/scss
npm add sass-loader sass
echo "@import \"choices.js/src/styles/choices.scss\";" >> app/javascript/packs/application.scss
git add .
git commit -am "Scss test"
bin/shakapacker # WORKS, CSS OUTPUT PRESENT
npm add choices.js@^11.0.0
bin/shakapacker # DOES NOT WORK

Error:

Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
  ╷
1 │ @import "choices.js/src/styles/choices.scss";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  app/javascript/packs/application.scss 1:9  root stylesheet

Suggested solution

https://github.com/ifad/Choices/tree/bugfix/style-export

  1. npm add choices.js@ifad/choices#bugfix/style-export
  2. Retry bin/shakapacker

Details are in the commit message

Ref: https://webpack.js.org/guides/package-exports/#reference-syntax

@tagliala tagliala added the bug label Aug 30, 2024
@tagliala tagliala changed the title Upgrading to v11: missing styles package export Upgrading to v11: missing style package export Aug 30, 2024
@tagliala tagliala changed the title Upgrading to v11: missing style package export [v11]: missing style package export for webpack based asset pipelines Aug 30, 2024
@tagliala tagliala changed the title [v11]: missing style package export for webpack based asset pipelines [v11] missing style package export for webpack based asset pipelines Aug 30, 2024
@Xon Xon linked a pull request Aug 31, 2024 that will close this issue
@Xon
Copy link
Collaborator

Xon commented Aug 31, 2024

@tagliala Can you try the webpack-css branch from this #1188 PR?

It appears to be the "sideEffects": false being an overly big hammer for webpack ref

tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's package.json

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's package.json

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's `package.json`.

- Add `style` package export
- Add `styles.scss` and `styles` exports
- Add `styles.scss` to "side effects" to prevent issues with tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```scss
@import "choices.js";
@import "choices.js/styles";
@import "choices.js/styles.scss";
```

Refs:
- https://webpack.js.org/guides/package-exports/
- FortAwesome/Font-Awesome#18654

Close Choices-js#1184
@tagliala
Copy link
Contributor Author

tagliala commented Aug 31, 2024

Hello, unfortunately this does not work with my specific use case, but I can also see that fontawesome's package.json contains sideEffects entries for .css and .scss.

I've tried

  1. @import "choices.js/src/styles/choices";
  2. @import "choices.js/src/styles/choices.scss";
  3. @import "choices.js";

And the error is always the same

Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
   ╷
30 │ @import "choices.js/src/styles/choices.scss";
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵

Back in 2022, when Font Awesome 6 was released, we had to deal with a lot of use cases and asset pipelines. I can still provide a script to create a reproducible test case, but that would be specific to Rails, Ruby, webpack, shakapacker. Let me know if it is the case

However, according to our finding back at the times, the following commit should contain all the necessary parts to make webpack work and prevent tree-shaking issues:

ifad@6a532c0

Please also check the side effects

@Xon
Copy link
Collaborator

Xon commented Aug 31, 2024

Can you try using the following syntax against the proposed PR?

@import '~choices.js/src/styles/choices.scss'

The ~ is a bit of webpack syntax which I believe will made it pull the stylesheet from the node_modules path. You'll need sass-loader/sass configured in webpack.

@tagliala
Copy link
Contributor Author

tagliala commented Aug 31, 2024

Hi,

The ~ is a bit of webpack syntax which I believe will made it pull the stylesheet from the node_modules path. You'll need sass-loader/sass configured in webpack.

I do have those, but using ~ was an old deprecated way of referencing modules used until 2022

Ref: https://webpack.js.org/loaders/sass-loader/#resolving-import-at-rules

Using ~ is deprecated and should be removed from your code, but we still support it for historical reasons. Why can you remove it? The loader will first try to resolve @import as a relative path. If it cannot be resolved, then the loader will try to resolve @import inside node_modules.

Ref: diowa/ruby3-rails6-bootstrap-heroku@370f749

I've get rid of all ~s in my projects a couple of years ago.

Unfortunately we had a lot of struggles with exports entry and webpack. And I understand the resistance to including changes in package.json

Ref: fnando/i18n#91 (comment)


Said so, I will provide you the script that I've used in Font Awesome when we had to deal with this package.json entry and webpack(er) based asset pipelines. Please allow me some time (I will create a new comment)


EDIT: sorry, I've seen the .css files. I'm going to improve the issue description and the fix

tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's `package.json`.

- Add `style` package export for webpack
- Add `sass` package export for webpack
- Add `styles.css` and `styles` exports for main CSS file
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```css
@import "choices.js";
@import "choices.js/styles";
@import "choices.js/styles.css";
```

```scss
@import "choices.js";
```

Refs:
- https://webpack.js.org/guides/package-exports/
- FortAwesome/Font-Awesome#18654

Close Choices-js#1184
@Xon
Copy link
Collaborator

Xon commented Aug 31, 2024

@tagliala Can you create a PR for your requested changes?

@tagliala
Copy link
Contributor Author

@Xon Yes I can, I'm now investigating also css support, dedicated sass support, and it requires a little bit of time. I will use this issue to post updates and eventually open a PR

@tagliala
Copy link
Contributor Author

tagliala commented Aug 31, 2024

WORK IN PROGRESS

Tools and versions required to replicate

  • npm 10.8.0
  • Shakapacker 7/8
  • Node 20.15.0
  • Ruby 3.3.4 (should not be relevant)
  • Rails 7.2.1 (anything >= 6.1.0 should not be relevant)

Actual behavior

When updating from Choices.js 10 to Choices.js 11, shakapacker is not able
to resolve

  • @import "choices.js/src/styles/choices"; in Scss
  • import "choices.js/public/assets/styles/choices.css"; in JS

This is due to the new exports entry in package.json, which require
specific entries for webpack, such as style

How to reproduce

Initial app

rails _7.2.1_ new test-choices-package-exports --skip-active-record --skip-javascript --skip-git --skip-test
cd test-choices-package-exports
echo "{ \"private\": true, \"packageManager\": \"npm@10.8.2\" }" > package.json
echo "gem 'shakapacker', '8.0.2'" >> Gemfile
bundle
rails shakapacker:install
npm add css-loader style-loader mini-css-extract-plugin css-minimizer-webpack-plugin
npm add choices.js@10.2.0
echo "module.exports = { plugins: [require('postcss-import')] }" > postcss.config.js
git add .
git commit -am "First commit"
git branch tests/scss main
git branch tests/css main

CSS import from javascript

git checkout tests/css
echo "import \"choices.js/public/assets/styles/choices.css\";" >> app/javascript/packs/application.js
git commit -am "CSS test"
bin/shakapacker # WORKS, CSS OUTPUT PRESENT
npm add choices.js@^11.0.0
bin/shakapacker # DOES NOT WORK

Error:

ERROR in ./app/javascript/packs/application.js 16:0-53
Module not found: Error: Package path ./public/assets/styles/choices.css is not exported from package ./node_modules/choices.js (see exports field in ./node_modules/choices.js/package.json)

Sass

git checkout tests/scss
npm add sass-loader sass
echo "@import \"choices.js/src/styles/choices.scss\";" >> app/javascript/packs/application.scss
git add .
git commit -am "Scss test"
bin/shakapacker # WORKS, CSS OUTPUT PRESENT
npm add choices.js@^11.0.0
bin/shakapacker # DOES NOT WORK

Error:

Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Can't find stylesheet to import.
  ╷
1 │ @import "choices.js/src/styles/choices.scss";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  app/javascript/packs/application.scss 1:9  root stylesheet

Cause

The cause is the new exports field in package.json. Apparently it is tricking
webpack and it is not able to solve choices.js's stylesheet

Suggested solution

https://github.com/ifad/Choices/tree/bugfix/style-export

  1. npm add choices.js@ifad/choices#bugfix/style-export
  2. For CSS in js: change import to import "choices.js"; or import "choices.js/styles";
  3. For Scss: change @import to @import "choices.js/scss/choices";
  4. Retry bin/shakapacker

Details are in the commit message

Ref: https://webpack.js.org/guides/package-exports/#reference-syntax

tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's `package.json`.

- Add `style` package export for webpack
- Add `sass` package export for webpack
- Add `styles.css` and `styles` exports for main CSS file
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```css
@import "choices.js";
@import "choices.js/styles";
@import "choices.js/styles.css";
```

```scss
@import "choices.js";
```

Refs:
- https://webpack.js.org/guides/package-exports/
- FortAwesome/Font-Awesome#18654

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Mimic FontAwesome's `package.json` to improve compatibility with webpack

- Add `style` package export to allow main CSS import from JavaScript
- Add `sass` package export to allow
- Add `styles.css` and `styles` exports for main CSS file
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```js
import "choices.js";
import "choices.js/styles";
import "choices.js/styles.css";
```

```scss
@import "choices.js";
```

Refs:
- https://webpack.js.org/guides/package-exports/
- FortAwesome/Font-Awesome#18654

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Add some entries to `package.json` to improve compatibility with webpack

- Add `style` package export to allow main CSS import from JavaScript
- Add `sass` package export to allow
- Add `styles.css` and `styles` exports for main CSS file
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```js
import "choices.js";
import "choices.js/styles";
```

```scss
@import "choices.js/scss/styles";
```

I was expecting that `@import "choices.js";` in scss would have imported
the Scss file, but it is not the case. It is taking the CSS.

Refs:
- https://webpack.js.org/guides/package-exports/

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Aug 31, 2024
Add some entries to `package.json` to improve compatibility with webpack

- Add default `style` and `sass` exports as per webpack requirements
- Add `styles/*` exports for CSS files
- Add `scss/styles/*` exports for Scss files
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import the style with the following
approaches:

```js
import "choices.js/styles/choices.css"; // CSS
import "choices.js/scss/styles/choices.scss"; // Scss
```

```scss
@import "choices.js/scss/styles/choices";
```

Refs:
- https://webpack.js.org/guides/package-exports/

Close Choices-js#1184
tagliala added a commit to ifad/Choices that referenced this issue Sep 1, 2024
Add some entries to `package.json` to improve compatibility with webpack

- Add default `style` and `sass` exports as per webpack requirements
- Add `public/assets/styles/*` exports for CSS files
- Add `src/styles/*` exports for Scss files. Extension can be omitted
  to prevent linting issues with `stylelint`
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import styles with the same syntax
of v10 to prevent a breaking change in webpack based applications

Refs:
- https://webpack.js.org/guides/package-exports/
- 

Close Choices-js#1184
@Xon Xon closed this as completed in #1193 Sep 2, 2024
@Xon Xon closed this as completed in 5721e9a Sep 2, 2024
johnformio pushed a commit to formio/Choices that referenced this issue Jan 13, 2025
* Fix coverage report

* Compile JS files

* Update playwright test name

* Disable large set of tests, and increase workers since workers ahve 2 cores

* Fix unit tests

* Fix test:e2e/test:e2e:all not starting the webserver

* Fix incorrect label[for] attributes in tests

* Add aria-label as required from the label[for] which points at an element. A config.labelId overrides this

* JSDOM support 'ch' character widths

* Fix unit tests no supplying the template renderer with the context they are expecting

* Move code around to remind the reduce dependencies between templates.ts and choices.ts. Fix overriding some notice templates didn't work

* Correctly setup templates

* Compile JS files

* Run e2e tests on local host and not a fixed ipv4

* Fix wrong key for caching playwright data & reduce e2e test log spam

* Fix extracting playright version

* Adjust timeouts

* Adjust caching checks

* Adjust caching checks

* Adjust caching checks

* Adjust gitflow actions for consistency

* update workflow

* Ignore intelij per-project test execution configuration directory

* Use playwright to start a background server for tests, saves possible race on compiling types-script

* intelij expects playwright test file to import from '@playwright/test' when determining what test suite to execute a test from the gutter

* Update tests

* Convert select-multiple element tests, match all tests on the page

* Update destroy/re-init tests

* Update various tests to reduce false positives

* Fix edge case where the max item notice didn't render as expected (text/select-multiple)

* Byte shaving

* Split _canAddItems and _canCreateItems into separate functions, fix input limit didn't show it's notice and text elements would show a choices list

* Chore; tighten up usage of isScrolledIntoView and return type of getAdjacentEl

* Use querySelector<HTMLElement>/querySelectorAll<HTMLElement> to type hint the return type as expected

* Compile JS files

* Byte-shave

* Update tests to check rendering of dropdown item

* Allow choices.js to be imported on nodejs, useful for tests and also server side rendering. As windows.document is by default not defined, the default template rendering will not function. The `callbackOnCreateTemplates` callback must be used. Choices-js#861

* Prefix build flags with CHOICES_, setup canUseDom to be setable via enviromental variables

* Notices are trusted and any user data is escaped, simplify notice rendering code, and fix inconsistency in rendering the "press enter to add X" notice.

* Fix remote data e2e test

* Do not hide the input as this disables rendering the placeholder

* Compile JS files, reduce build size as .mjs users should be doing their own tree-shaking/minifying

* Update CHANGELOG.md

* Replace puppeteer/selenium screenshots with playwright

* Enable playwright for additional platforms

* Test github action e2e tests

* Force the dev server to execute during CI when WATCH_HOST is defined

* Remove old web server used during CI

* Force must be a bool

* Fix edge case where aria-label could be added twice

* Allow searchResultLimit to specific no limit

* Remove redundant variable set

* Reduce the number of loops over choices when rendering search results, results in more compact code.

* Compile JS files

* reduce strictness of closeDropdownOnSelect validation

* Update the URL used in e2e tests

* Adjust e2e tests

* Only run a single work on CI to avoid starving the CPU for the browser

* Also export a json report for the e2e test

* Work on all test targets

* Update github action cache logic

* Only archive test reports if the github action isn't canceled

* Use blob report and then merge all the reports together

* Update screenshots

* Disable caching playwright binaries on windows

* Run separate github action for each browser

* Just give-up on binary caching as it causes issues

* Make remote loading tests less flaky

* Fix select-multiple 'checking placeholder values' test

* Use line reporter for development mode e2e testing

* Block polyfill URLs since they aren't needed with latest browsers

* Use a HAR files to mock the external API to avoid token API usages from breaking the test

* webkit and firefox are bizarrely flaky

* Correctly format excludes

* Remove github reporter on trying to troubleshoot the lack of merged report

* Split optional argument for expectVisibleDropdown into new test function

* Remove usage of Object.assign to reduce minified bundle size (assigning to a local variable is paradoxically smaller)

* For performance, use a document fragment when adding new choices to the backing `<select>`

* Inline append method

* Centralize build flags

* Compile JS files

* Simplify Templates interface

* Byte shaving by hoisting variables which are used more than once (inlining when they aren't) and some code deduplication

* Byte shaving, and be consistant about how innerHTML is used

* Trigger a search event when search stops

* Update CHANGELOG.md

* Fix the page scrolls when you press 'space' on a single select input Choices-js#1103

* Update CHANGELOG.md

* Make demo page screenshot test less flaky

* Compile JS files

* Update typescript definition for `removeActiveItems` to explicitly mark `excludedId` as optional Choices-js#1116

* Update e2e test to be run

* Update build-and-test github action

* Update deployment/publish action

* Tweak package.json for e2e tests

* Update build-and-test github action

* Update trigger conditions for various workflows

* 11.0.0-rc8

* Remove unused package.json action

* Re-use github actions on push to main

* Add sponsored by block

* Adjust logo size

* Remove non-required build flag usage

* In _onKeyDown, Inline a few variables which are only used once

* If itemSelectText is an empty string, do not reserve space for the "press to select" text phrase. Resolves Choices-js#820

* Reduce work done for unhighlightAll during on-click handler (batch handler in v11.0.0-rc8 would also have helped) Choices-js#522 Choices-js#599

* Performance tests with thousands of items selected

* Inline highlightItem/unhighlightItem to avoid quadratic complexity

* Switch from string literal type to effectively valueOf<EventType> to intern strings

* Update tests to permit newer target versions (main source tree still targets ES5)

* Fix fragile highlightall/unhighlightall tests

* Dramatically reduce the performance impact of changing items (avoid re-rendering all items on every change)

* Support item rendering latching onto pre-rendered items

* Handle case where the element needs to be regenerated

* Fix placeholder not applying as expected for select-one when loading items

* Push highlight css toggle into reducer, simplifying state tracking

* Avoid touching every item after an item is added, instead call unhighlightall as required

* Simplify _onBlur & _onFocus

* Adjust unhighlightAll to generally be called in a _store.withTxn to reduce redundnant rendering passes

* Hoist variables to reduce bundle size

* Preserve choices associated with groups

* Inline renderChoice functionality & cleanup duplication

* Cache element/group to reduce rendering time

* Avoid reflows by using display: none; vs visibility: hidden;

* Remove overly fragile unit testing of rendering

* Restore older placeholder rendering behavior

* Fix dropdown flip logic did not consider verticality of both sides of the dropdown (ref: #2)

* Update e2e tests

* linting fixes

* Adjust when the choice's cached element is purged

* Simplify groupId check, and push group label rendering into template

* Use Element.replaceChildren API, update polyfill definition

* Compile JS files

* Disable unusably slow test

* Commit linter fixes

* cleanup css

* Remove unused eslint disable

* Add ValueOf utility type

* Use const object instead of loose constants for text/select-one/select-multiple

* Allow renderSelectedChoices to be a direct boolean to simplify internal logic

* Add e2e test for renderSelectedChoices flag

* Invalidate cached choice when an item is added/removed & fix renderSelectedChoices === 'always' with select-multiple

* Revert & add some variable hoisting as it compressed better

* Cleanup unused function and redundant variable assignment

* Update  tests

* Compile JS files

* Cleanup unused import

* Commit lint fixed file

* Update CHANGELOG.md

* Cleanup appending group label to choices

* Appease linter

* release prep

* Update bug_report.md

* Avoid iterating the active choices list multiple times

* Add e2e test for reset button

* Fix refresh() did not reset the backing select's options attributes when "deselectAll" argument was true

Fix clearStore() did not remove selected item from the items list

* Compile JS files

* Fix unit test & e2e test

* Update CHANGELOG.md

* Force merge reports

* Adjust e2e testing matrix

* Additional e2e tests for copy & paste support

* Add serialization locks around copy/paste to workaround a lack of clipboard isolation

* Additional paste & search tests

* Ensure timers can trigger for copy & paste tests

* Rewrite e2e paste to avoid javascript APIs

* Linting fix

* Revert "Adjust e2e testing matrix"

This reverts commit 1ba4f81.

* Update CHANGELOG.md

* Use helper function for add/remove classes, standardize adding/setting classnames for elements. Also shaves ~180 bytes off the compressed bundle

* Release prep

* Adjust github actions to work on main branch instead of master branch

* Update pages deployment to use node 20, and update various actions to no longer use out of date node versions

* Chore: add e2e tests for "no choices" behavior to match v10

* Add missing 'multiple' attribute to "no press to select" test

* Move comment around disabled/selected/active flags from reducer to the choice object

* Fix choice disable state wasn't considered when showing the "no choices to choose from" notice

* Document previous pre-v10 behavior of noChoicesText

* Adjust "within form" tests to have a 2nd selectable item to avoid no choices exist notice

* Fix regression "no choices to choose from" notice not triggering when no selectable choices exist for select-one. [Choices-js#1185](Choices-js#1185)

* Tests for no choices besides the current selected

* Byte shaving _initStore method

* Compile JS files

* Pass `getClassNames` as the 3rd argument to `callbackOnCreateTemplates` callback

* Suppress import cycle between templates/options

* Add missing webpack exports

Add some entries to `package.json` to improve compatibility with webpack

- Add default `style` and `sass` exports as per webpack requirements
- Add `public/assets/styles/*` exports for CSS files
- Add `src/styles/*` exports for Scss files. Extension can be omitted
  to prevent linting issues with `stylelint`
- Add `*.scss` and `*.css` to "side effects" to prevent issues with
  tree-shaking

With this commit, it is possible to import styles with the same syntax
of v10 to prevent a breaking change in webpack based applications

Refs:
- https://webpack.js.org/guides/package-exports/
- https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-import-partial-extension/README.md

Close Choices-js#1184

* Update CHANGELOG.md

* Update e2e tests - add search and then remove search for displaying expected banners

* Cleanup notice display on no results vs no choices

* Reset notices after adding a new choice

* Adjust additional notice reset calls

* Adjust CHANGELOG.md

* Fix regression of UnhighlightItem event not firing (Choices-js#1173)

* Fix unit tests testing the wrong thing

* Compile JS files

* Fix "no choices' notice wasn't cleared as expected

* Untangle clearStore and clearChoices

- Fix `clearChoices()` would also remove items, and clearing the search flag.
- Fix `clearStore()` was wiping options

* Fix unit test

* `duplicateItemsAllowed` option is now respected by `setChoices()` method. Resolves Choices-js#855

* Commit clearStore change

* Document clearStore and clearChoices on if they reset the search state

* Update CHANGELOG.md

* Add autocomplete example to e2e test

* Add flag to setChoices on if to reset the search flag (default true)

* Compile JS files

* De-dupe type, and remove broad @typescript-eslint/no-explicit-any lint suppression

* _getChoiceForOutput never gets an undefined value

* Fix typing for getValue, which removes the need for eslint-disable @typescript-eslint/no-explicit-any

* Fix refresh() did not work properly with opt-groups

* Fix missing tag in e2e test html

* Fix group-id was not added to choices outside of search

* Fix opt-group e2e tests false positive

* Use group reference instead of groupId

* Fix removing a choice didn't work properly when it was part of a group

* Fix regression of choices without groups where not rendered when groups where present

* cleanup tests

* Use parentElement not parentNode, and cleanup arguments which will not have undefined passed to them

* Adjust timeouts for e2e CI

* Compile JS files

* Bump vite from 5.3.5 to 5.4.6

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.5 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rollup from 4.20.0 to 4.22.4

Bumps [rollup](https://github.com/rollup/rollup) from 4.20.0 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.20.0...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* version bump

* Replace enum with {} as const (compiles down to the same minified code)

* Compile JS files

* Be explicit about type argument being passed to mapInputToChoice

* Fix input text - method setValue Choices-js#1207

* Update E2E tests

* Remove unused e2e tests

* Update E2E tests

* Update e2e tests to upload failed screenshots if multiple for the same platform fail

* Update E2E tests

* Update v11 event payload in README.md

* removed type "module" from package.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Xon <635541+Xon@users.noreply.github.com>
Co-authored-by: Xon <Xon@users.noreply.github.com>
Co-authored-by: Geremia Taglialatela <tagliala.dev@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Darren <DarrenOnce@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants