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

[bug] bud.entry import syntax breaks with Bud 6.6.x #1890

Closed
retlehs opened this issue Nov 18, 2022 · 2 comments · Fixed by #1891
Closed

[bug] bud.entry import syntax breaks with Bud 6.6.x #1890

retlehs opened this issue Nov 18, 2022 · 2 comments · Fixed by #1891
Labels
bug Something isn't working

Comments

@retlehs
Copy link
Sponsor Member

retlehs commented Nov 18, 2022

Describe the issue

Try to use bud.entry with import as described in the docs. Examples:

  1. via @joshuafredrickson (working example in < 6.6.0):
app: ['@scripts/app', '@styles/app'],
'block-library': {
  import: '@styles/block-library',
  dependOn: 'app',
},
.entry({
  app: {
    import: ["@scripts/app", "@styles/app"],
  },
})

Actual Behavior

$ bud build
[bud@6.6.1] [sage] [api] › ✘  error

 bud.entry
 Array must contain at least 2 element(s)
Expected object, received array
import item must be a string.

 usage docs: https://bud.js.org/docs/bud.entry

[bud@6.6.1] [sage] › ✘  error     exiting with code 1
@retlehs retlehs added the bug Something isn't working label Nov 18, 2022
@kodiakhq kodiakhq bot closed this as completed in #1891 Nov 20, 2022
kodiakhq bot pushed a commit that referenced this issue Nov 20, 2022
At first I thought I wanted to enforce not mixing/matching styles of import and would just update documentation. But, on second thought I decided it's better to stick to the current API -- the cost of maintaining it is essentially just one reducer.

- Fix: #1890
- Improve unit test: `sources/@roots/bud-api/src/methods/entry/index.test.ts`
- Add reproduction: `tests/reproductions/issue-1890`
- Add reproduction test: `tests/reproductions/issue-1890.test.ts` 

refers:

- #1890 

## Type of change

**PATCH: backwards compatible change**



This PR includes breaking changes to the following core packages:

- none

This PR includes breaking changes to the follow extensions:

- none

## Dependencies

### Adds

- none

### Removes

- none
@kellymears
Copy link
Member

Fixed in 6.6.2 ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants