AlaskaAirlines / auro-combobox

An auroLabs custom element w/an experimental API. You've been warned.
https://auro.alaskaair.com/components/auroLabs
Apache License 2.0
4 stars 1 forks source link

Current build misses install and breaks user experience #166

Closed blackfalcon closed 5 months ago

blackfalcon commented 6 months ago

Please verify the version of auro-combobox you have installed

@latest

Please describe the bug

See this line in the code

https://github.com/AlaskaAirlines/auro-combobox/blob/fb4ab6f4aa1786578032ef8166eef2e4031530ad/src/auro-combobox.js#L9

This dependency is only listed as a devDependency and the user is unaware of needing to install it.

https://github.com/AlaskaAirlines/auro-combobox/blob/fb4ab6f4aa1786578032ef8166eef2e4031530ad/package.json#L22-L35

Reproducing the error

This issue cannot be reproduced on the Auro docsite

Expected behavior

All dependencies, direct or peer, need to be listed properly so that the user has all the dependencies to have a successful install.

Recommendation

Remove @aurodesignsystem/auro-library from devDependencies and add to peerDependencies per recommendation of this Discussion https://github.com/AlaskaAirlines/WC-Generator/discussions/505#discussioncomment-8611241

What browsers are you seeing the problem on?

No response

Additional context

Please manage this issue with https://github.com/AlaskaAirlines/auro-combobox/issues/167 into the same PR for a single release.

This bug was reported with the following error

X [ERROR] Could not resolve "@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs"

    node_modules/@aurodesignsystem/auro-combobox/src/auro-combobox.js:9:41:
      9 │ import { AuroDependencyVersioning } from '@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs';
        ╵                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

  You can mark the path "@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs"
  as external to exclude it from the bundle, which will remove this error.

The following code is how the app is importing the dependency

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

/** @type {import('vite').UserConfig} */
export default defineConfig({
  plugins: [react({
    include: /^src$/
  })],
  base: "/enroll",
  build: {
    rollupOptions: {
      external: [
        "@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs"
      ]
    }
  }
});

Exit criteria

This issue can be closed once the dependencies have updated and validated with a local install.