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

fix(deps): Avoid conflict between with version constants #23

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"node >= 18"
],
"scripts": {
"build": "microbundle --format cjs,modern --no-compress --define VERSION=$npm_package_version",
"build:watch": "microbundle watch --format cjs,modern --no-compress --define VERSION=$npm_package_version",
"build": "microbundle --format cjs,modern --no-compress --define __CARTO_API_CLIENT_VERSION=$npm_package_version",
"build:watch": "microbundle watch --format cjs,modern --no-compress --define __CARTO_API_CLIENT_VERSION=$npm_package_version",
"dev": "concurrently \"yarn build:watch\" \"vite --config examples/vite.config.ts --open\"",
"test": "vitest run --typecheck",
"test:watch": "vitest watch --typecheck",
Expand Down
3 changes: 3 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/** Current version of @carto/api-client. */
export const API_CLIENT_VERSION = __CARTO_API_CLIENT_VERSION;

/**
* Defines a comparator used when matching a column's values against given filter values.
*
Expand Down
6 changes: 6 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Injected by microbundle. The `@deck.gl/core` checkVersion()
* function will detect globally-defined 'VERSION' variables, and is inlined
* in the client bundle, so the 'VERSION' name should be avoided.
*/
declare const __CARTO_API_CLIENT_VERSION: string;
1 change: 0 additions & 1 deletion src/models/model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {getClient} from '../client.js';
import {
ApiVersion,
DEFAULT_GEO_COLUMN,
Expand Down