-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
build: transfer to esbuild for building pipeline #224
Draft
tharropoulos
wants to merge
22
commits into
typesense:master
Choose a base branch
from
tharropoulos:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: add tsup build system Modernize build system and package configuration - Migrate from webpack to tsup for improved build process. - Update package.json with new exports configuration and dependencies. - Add tsup.config.ts for flexible bundling options. - Target both cjs and esm. - Use minified versions of bundle by default. build: add cjs plugin or esbuild fix: import from cjs on `require` build: add esbuild options for bundling UMD dependencies - `loglevel` is written as a UMD module and has to be handled differently from axios fix: avoid reusing logger import from `loglevel` chore: remove uneeded common-js dependency for esbuild chore: remove build artifacts from source control chore: remove build artifact folders chore: add prepare script to run before package publishing chore: update package-lock based on changes
- Implement singleton SimpleLogger class with configurable log levels - Provide console output methods for different log severities - Define type-safe interfaces for log levels and their mappings - Remove need for dependency on external 'loglevel' library
- Remove uses of loglevel dependency for built-in logging
- Implement comprehensive test suite for SimpleLogger class. - Cover default log level, setLogLevel functionality, and message filtering based on log levels. - Ensure proper console method calls for each log level using chai-spies.
- Introduce the `drop_tokens_mode` parameter to the `SearchParams` interface, allowing more fine-grained control over token dropping behavior during search operations.
- Enhance the `SearchParams` interface in `Documents.ts` by adding the `override_tags` option. This option allows specifying tags for overriding search behavior, providing greater flexibility in query customization.
build: add tsup build system Modernize build system and package configuration - Migrate from webpack to tsup for improved build process. - Update package.json with new exports configuration and dependencies. - Add tsup.config.ts for flexible bundling options. - Target both cjs and esm. - Use minified versions of bundle by default. build: add cjs plugin or esbuild fix: import from cjs on `require` build: add esbuild options for bundling UMD dependencies - `loglevel` is written as a UMD module and has to be handled differently from axios fix: avoid reusing logger import from `loglevel` chore: remove uneeded common-js dependency for esbuild chore: remove build artifacts from source control chore: remove build artifact folders chore: add prepare script to run before package publishing chore: update package-lock based on changes
- Avoid build discrepancies between authors and users when installing from source control directly, by using the last build produced by a maintainer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enhance Typesense JS Library for Improved Usability and Maintainability
What is this?
This pull request introduces several improvements to the Typesense JS library's build system:
esbuild
and more specificallytsup
.These changes aim to make the Typesense JS library more accessible, efficient, and easier to integrate into web applications.
Changes
Added Features:
tsup
configuration intsup.config.ts
:tsup
configuration to build the library in a more efficient and optimized manner.Code Changes:
In
package.json
:main
,module
, andexports
fields to reflect the new build targets and file names.tsup
,browserslist-to-esbuild
, andesbuild-plugins-node-modules-polyfill
, to enable the improved build process.build
script to usetsup
.prepare
script to build before installing new dependencies and publishing to an npm registry.In
src/Typesense/Configuration.ts
:Configuration
class to use theloglevel
library directly, rather than importing the entire module.Removing build artifacts:
Documentation Updates:
README.md
: