Skip to content

Commit 3f58f2f

Browse files
Scott LottScott Lott
authored andcommitted
1.0 release 7
1 parent fd9212f commit 3f58f2f

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

dist/nano-sql.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nano-sql.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/history-plugin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {
88
};
99
Object.defineProperty(exports, "__esModule", { value: true });
1010
var utilities_1 = require("./utilities");
11+
var strs = ["_hist", "_hist_ptr"];
1112
var _NanoSQLHistoryPlugin = (function () {
1213
function _NanoSQLHistoryPlugin(historyModeArgs) {
1314
this.historyModeArgs = historyModeArgs;
@@ -51,8 +52,8 @@ var _NanoSQLHistoryPlugin = (function () {
5152
{ key: "ptr", type: "int" }
5253
];
5354
if (this.historyModeArgs === "database" || !this.historyModeArgs) {
54-
historyTables["_hist"] = historyTable;
55-
historyTables["_hist_ptr"] = historyTablePointer;
55+
historyTables[strs[0]] = historyTable;
56+
historyTables[strs[1]] = historyTablePointer;
5657
}
5758
else if (this.historyModeArgs !== "database" || isNotString) {
5859
this.historyModes = {};

src/history-plugin.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ interface HistoryRowMeta {
2020
histPtr: number;
2121
}
2222

23+
// const hist = "_hist";
24+
// const histPtr = "_hist_ptr";
25+
26+
const strs = ["_hist", "_hist_ptr"];
2327

2428
/**
2529
* New History Plugin
@@ -127,8 +131,8 @@ export class _NanoSQLHistoryPlugin implements NanoSQLPlugin {
127131

128132
// database/linear mode. all undo/redo is tracked across the entire database. Default behavior
129133
if (this.historyModeArgs === "database" || !this.historyModeArgs) {
130-
historyTables["_hist"] = historyTable;
131-
historyTables["_hist_ptr"] = historyTablePointer;
134+
historyTables[strs[0]] = historyTable;
135+
historyTables[strs[1]] = historyTablePointer;
132136
// table/row mode, undo/redo is tracked either per row OR per table
133137
} else if (this.historyModeArgs !== "database" || isNotString) {
134138

webpack.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,11 @@ const options = {
7171
switch (process.env.NODE_ENV) {
7272
case "production":
7373
options['plugins'].push(new webpack.optimize.UglifyJsPlugin({
74-
compress: {
75-
warnings: false,
76-
passes: 5
77-
},
78-
mangle: {
79-
props: { regex: new RegExp(/^_|Promise/) }
80-
}
74+
mangle: true
75+
/*mangle: {
76+
props: { regex: new RegExp(/^_|Promise/) },
77+
except: ['wood']
78+
}*/
8179
}));
8280
break;
8381
}

0 commit comments

Comments
 (0)