Flatten lib namespace

Move all functions and classes currently available through lib/name and
libName to be under a single flat namespace in lib.  This make
reorganising the lib namespace much simpler as the location of symbols
can move without breaking the consumers of lib.

The multi-entrypoint design was already problematic for the web plugin
system which couldn't effectively use it due to how webpack's shared
module system is awkward to set up with multiple entrypoints per package.
This commit is contained in:
Hornwitser committed 2023-07-28 16:03:29 +02:00
1 parent bb58670597
commit bfe119eaa3
143 files changed
+1798 -1918

No files matched your search

+5 -5
View File
@@ -210,18 +210,18 @@ function wordMatches(word, ...texts) {
}
/**
* @typedef {object} module:lib/helpers~ParsedTerm
* @typedef {object} module:lib~ParsedTerm
* @property {string} type - Type of term, either attribute or word.
* @property {string=} name - attribute only: Name of attribute.
* @property {boolean=} exclude - word only: exclude results with this word.
* @property {string | module:lib/helpers.ParsedTerm} value -
* @property {string | module:lib.ParsedTerm} value -
* Parsed value of this term. Is a string if type is word, and a
* ParsedTerm if type is attribute.
*/
/**
* @typedef {object} module:lib/helpers~ParsedSearch
* @property {Array<module:lib/helpers~ParsedTerm>} terms -
* @typedef {object} module:lib~ParsedSearch
* @property {Array<module:lib~ParsedTerm>} terms -
* Parsed result of search terms.
* @property {Array<string>} issues -
* Issues detected while parsing the seach string.
@@ -248,7 +248,7 @@ function wordMatches(word, ...texts) {
* @param {Object<string, string>} attributes -
* Recognized attributes and their format. Currently only word is
* supported.
* @returns {module:lib/helpers~ParsedSearch} parsed terms of the search.
* @returns {module:lib~ParsedSearch} parsed terms of the search.
* @static
*/
function parseSearchString(input, attributes = {}) {