From bd6cda7dd0b3e7c160d9b1a80f15b02f1bec0247 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 30 May 2024 10:04:39 +0200 Subject: [PATCH 1/2] JavaScript: Naming things The package intends to be published as `@cratedb/cratedb-sqlparse`. --- cratedb_sqlparse_js/package-lock.json | 4 ++-- cratedb_sqlparse_js/package.json | 2 +- cratedb_sqlparse_js/vite.config.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cratedb_sqlparse_js/package-lock.json b/cratedb_sqlparse_js/package-lock.json index 24cc5c0..88c7715 100644 --- a/cratedb_sqlparse_js/package-lock.json +++ b/cratedb_sqlparse_js/package-lock.json @@ -1,11 +1,11 @@ { - "name": "cratedb-sqlparse", + "name": "@cratedb/cratedb-sqlparse", "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "cratedb-sqlparse", + "name": "@cratedb/cratedb-sqlparse", "version": "0.0.2", "license": "MIT", "dependencies": { diff --git a/cratedb_sqlparse_js/package.json b/cratedb_sqlparse_js/package.json index 238fb6d..a976568 100644 --- a/cratedb_sqlparse_js/package.json +++ b/cratedb_sqlparse_js/package.json @@ -1,5 +1,5 @@ { - "name": "cratedb-sqlparse", + "name": "@cratedb/cratedb-sqlparse", "version": "0.0.2", "type": "module", "files": [ diff --git a/cratedb_sqlparse_js/vite.config.js b/cratedb_sqlparse_js/vite.config.js index 6c7f532..7e37733 100644 --- a/cratedb_sqlparse_js/vite.config.js +++ b/cratedb_sqlparse_js/vite.config.js @@ -10,8 +10,8 @@ export default defineConfig({ build: { lib: { // Could also be a dictionary or array of multiple entry points - entry: resolve(__dirname, 'parser/index.js'), - name: 'cratedb_sqlparse', // the proper extensions will be added + entry: resolve(__dirname, 'cratedb_sqlparse/index.js'), + name: '@cratedb/cratedb-sqlparse', // the proper extensions will be added fileName: 'sqlparse', }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled From 38dd4c56a08b87926b5ccb9733db8a3aacaab68b Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 30 May 2024 10:24:38 +0200 Subject: [PATCH 2/2] JavaScript: Use package name from `package.json` --- cratedb_sqlparse_js/vite.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cratedb_sqlparse_js/vite.config.js b/cratedb_sqlparse_js/vite.config.js index 7e37733..248b0ff 100644 --- a/cratedb_sqlparse_js/vite.config.js +++ b/cratedb_sqlparse_js/vite.config.js @@ -5,13 +5,14 @@ import { import { defineConfig } from 'vite' +import packageJson from './package.json'; export default defineConfig({ build: { lib: { // Could also be a dictionary or array of multiple entry points entry: resolve(__dirname, 'cratedb_sqlparse/index.js'), - name: '@cratedb/cratedb-sqlparse', // the proper extensions will be added + name: packageJson.name, // the proper extensions will be added fileName: 'sqlparse', }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled