clickhouse-migrations 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  ## Install
7
7
 
8
8
  ```sh
9
- npm install --global clickhouse-migrations
9
+ npm install clickhouse-migrations
10
10
  ```
11
11
 
12
12
  ## Usage
@@ -73,7 +73,7 @@ Migration file example:
73
73
  ```
74
74
  -- an example of migration file 1_init.sql
75
75
 
76
- SET allow_experimental_object_type = 1;
76
+ SET allow_experimental_json_type = 1;
77
77
 
78
78
  CREATE TABLE IF NOT EXISTS events (
79
79
  timestamp DateTime('UTC'),
package/lib/migrate.js CHANGED
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -319,7 +319,7 @@ var migration = function (migrations_home, host, username, password, db_name, db
319
319
  exports.migration = migration;
320
320
  var migrate = function () {
321
321
  var program = new commander_1.Command();
322
- program.name('clickhouse-migrations').description('ClickHouse migrations.').version('1.0.2');
322
+ program.name('clickhouse-migrations').description('ClickHouse migrations.').version('1.0.4');
323
323
  program
324
324
  .command('migrate')
325
325
  .description('Apply migrations.')
package/lib/sql-parse.js CHANGED
@@ -33,16 +33,3 @@ var sql_sets = function (content) {
33
33
  return sets;
34
34
  };
35
35
  exports.sql_sets = sql_sets;
36
- // -- any
37
- // SET allow_experimental_object_type = 1; --set option
38
- // SET allow_experimental_object_new = 1;
39
- // SELECT * FROM events
40
- // sdfsfdsd
41
- // -- asssss
42
- // --asdf
43
- // sdfsdf
44
- // sdfsfs
45
- // SET a=1
46
- // asdf
47
- // SET f=22
48
- // sdf
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickhouse-migrations",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "ClickHouse Migrations",
5
5
  "bin": {
6
6
  "clickhouse-migrations": "lib/cli.js"
@@ -8,7 +8,7 @@
8
8
  "main": "lib/migrate.js",
9
9
  "types": "lib/migrate.d.ts",
10
10
  "engines": {
11
- "node": ">=16"
11
+ "node": ">=20"
12
12
  },
13
13
  "private": false,
14
14
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "build": "rm lib/*; tsc",
19
19
  "test": "jest --config jestconfig.json",
20
20
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
21
- "lint": "eslint ./src --ext .ts",
21
+ "lint": "eslint ./src",
22
22
  "prepare": "npm run build",
23
23
  "prepublishOnly": "npm test && npm run lint",
24
24
  "preversion": "npm run lint",
@@ -26,21 +26,23 @@
26
26
  "postversion": "git push && git push --tags"
27
27
  },
28
28
  "dependencies": {
29
- "@clickhouse/client": "^1.5.0",
30
- "commander": "^12.1.0"
29
+ "@clickhouse/client": "^1.10.1",
30
+ "commander": "^13.1.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/jest": "^29.5.12",
34
- "@types/node": "^22.5.4",
35
- "@typescript-eslint/eslint-plugin": "^8.4.0",
36
- "@typescript-eslint/parser": "^8.4.0",
37
- "eslint": "^8.57.0",
38
- "eslint-config-prettier": "^9.1.0",
39
- "eslint-plugin-prettier": "^5.2.1",
33
+ "@eslint/js": "^9.18.0",
34
+ "@types/jest": "^29.5.14",
35
+ "@types/node": "^22.10.7",
36
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
37
+ "@typescript-eslint/parser": "^8.21.0",
38
+ "eslint": "^9.18.0",
39
+ "eslint-config-prettier": "^10.0.1",
40
+ "eslint-plugin-prettier": "^5.2.3",
40
41
  "jest": "^29.7.0",
41
- "prettier": "^3.3.3",
42
+ "prettier": "^3.4.2",
42
43
  "ts-jest": "^29.2.5",
43
- "typescript": "^5.5.4"
44
+ "typescript": "^5.7.3",
45
+ "typescript-eslint": "^8.21.0"
44
46
  },
45
47
  "files": [
46
48
  "lib/**/*"