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

Add filterable library-specific subsets in a future-proof way #167

Closed
Haroenv opened this issue Mar 27, 2018 · 1 comment · Fixed by #169
Closed

Add filterable library-specific subsets in a future-proof way #167

Haroenv opened this issue Mar 27, 2018 · 1 comment · Fixed by #169

Comments

@Haroenv
Copy link
Collaborator

Haroenv commented Mar 27, 2018

const packageDetail = {
  ...otherKeys,
  subset: {
    babel: "6",
    "angular-cli": "/path-to/scaffold"
    "gatsby": "component"
  }
}

Now I should still check how we can easily make it facetable, I'm not sure if putting it like this will allow that. An idea I had to solve that was this:

const packageDetail = {
  ...otherKeys,
  subset: {
    "keys": ["babel", "angular-cli", "gatsby"],
    babel: "6",
    "angular-cli": "/path-to/scaffold"
    "gatsby": "component"
  }
}

In this case only the subset.keys would be facetable, but it would mean that we can't use the name keys for any of the subsets (seems fine for me).

@Haroenv
Copy link
Collaborator Author

Haroenv commented Mar 27, 2018

To be clear, this is to prevent the status quo of overloading keywords with this info.

For example: babel wants to have all packages with a specific type of name, angular wants those with package.json#scaffold, Gatsby wants specific keywords/names.

This will allow the extra information they want, be it a string or an object, to be in line with what the data is used for.

  const packageDetail = {
    ...otherKeys,
-   keywords: [...originalKeywords, ?babelKeyword, ?gatsbyKeyword ...],
+   subset: {
+     "keys": ["babel", "angular-cli", "gatsby"],
+     babel: "6",
+     "angular-cli": "/path-to/scaffold"
+     "gatsby": "component",
+   },
}

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