Skip to content

Commit e09614a

Browse files
committed
first 3.x release (3.0.1)
1 parent ae057d1 commit e09614a

15 files changed

+343
-236
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In a browser:
2929
Using npm:
3030

3131
```shell
32-
npm install --save-dev javascript-state-machine@3.0.0-rc.1 # note explicit pre-release version
32+
npm install --save-dev javascript-state-machine
3333
```
3434

3535
In Node.js:

RELEASE_NOTES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 3.0.1 (June 10th 2017)
2+
------------------------------
3+
4+
* First 3.x release - see 3.0.0-rc.1 release notes below
5+
6+
* fix issue #109 - rejection from async lifecycle method does not reject transitions promise
7+
* fix issue #106 - async transition: forward resolved value
8+
* fix issue #107 - lifecycle event name breaks for all uppercase
9+
110
Version 3.0.0-rc.1 (January 10 2017)
211
------------------------------------
312

dist/state-machine-history.js

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,41 @@
1111
return /******/ (function(modules) { // webpackBootstrap
1212
/******/ // The module cache
1313
/******/ var installedModules = {};
14-
14+
/******/
1515
/******/ // The require function
1616
/******/ function __webpack_require__(moduleId) {
17-
17+
/******/
1818
/******/ // Check if module is in cache
19-
/******/ if(installedModules[moduleId])
19+
/******/ if(installedModules[moduleId]) {
2020
/******/ return installedModules[moduleId].exports;
21-
21+
/******/ }
2222
/******/ // Create a new module (and put it into the cache)
2323
/******/ var module = installedModules[moduleId] = {
2424
/******/ i: moduleId,
2525
/******/ l: false,
2626
/******/ exports: {}
2727
/******/ };
28-
28+
/******/
2929
/******/ // Execute the module function
3030
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31-
31+
/******/
3232
/******/ // Flag the module as loaded
3333
/******/ module.l = true;
34-
34+
/******/
3535
/******/ // Return the exports of the module
3636
/******/ return module.exports;
3737
/******/ }
38-
39-
38+
/******/
39+
/******/
4040
/******/ // expose the modules object (__webpack_modules__)
4141
/******/ __webpack_require__.m = modules;
42-
42+
/******/
4343
/******/ // expose the module cache
4444
/******/ __webpack_require__.c = installedModules;
45-
45+
/******/
4646
/******/ // identity function for calling harmony imports with the correct context
4747
/******/ __webpack_require__.i = function(value) { return value; };
48-
48+
/******/
4949
/******/ // define getter function for harmony exports
5050
/******/ __webpack_require__.d = function(exports, name, getter) {
5151
/******/ if(!__webpack_require__.o(exports, name)) {
@@ -56,7 +56,7 @@ return /******/ (function(modules) { // webpackBootstrap
5656
/******/ });
5757
/******/ }
5858
/******/ };
59-
59+
/******/
6060
/******/ // getDefaultExport function for compatibility with non-harmony modules
6161
/******/ __webpack_require__.n = function(module) {
6262
/******/ var getter = module && module.__esModule ?
@@ -65,36 +65,60 @@ return /******/ (function(modules) { // webpackBootstrap
6565
/******/ __webpack_require__.d(getter, 'a', getter);
6666
/******/ return getter;
6767
/******/ };
68-
68+
/******/
6969
/******/ // Object.prototype.hasOwnProperty.call
7070
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
71-
71+
/******/
7272
/******/ // __webpack_public_path__
7373
/******/ __webpack_require__.p = "";
74-
74+
/******/
7575
/******/ // Load entry module and return exports
7676
/******/ return __webpack_require__(__webpack_require__.s = 1);
7777
/******/ })
7878
/************************************************************************/
7979
/******/ ([
8080
/* 0 */
81-
/***/ function(module, exports, __webpack_require__) {
81+
/***/ (function(module, exports, __webpack_require__) {
8282

8383
"use strict";
8484

8585

86-
module.exports = function(label) {
87-
var n, word, words = label.split(/[_-]/), result = words[0];
86+
//-------------------------------------------------------------------------------------------------
87+
88+
function camelize(label) {
89+
90+
if (label.length === 0)
91+
return label;
92+
93+
var n, result, word, words = label.split(/[_-]/);
94+
95+
// single word with first character already lowercase, return untouched
96+
if ((words.length === 1) && (words[0][0].toLowerCase() === words[0][0]))
97+
return label;
98+
99+
result = words[0].toLowerCase();
88100
for(n = 1 ; n < words.length ; n++) {
89-
result = result + words[n].charAt(0).toUpperCase() + words[n].substring(1);
101+
result = result + words[n].charAt(0).toUpperCase() + words[n].substring(1).toLowerCase();
90102
}
103+
91104
return result;
92105
}
93106

107+
//-------------------------------------------------------------------------------------------------
108+
109+
camelize.prepended = function(prepend, label) {
110+
label = camelize(label);
111+
return prepend + label[0].toUpperCase() + label.substring(1);
112+
}
113+
114+
//-------------------------------------------------------------------------------------------------
115+
116+
module.exports = camelize;
117+
94118

95-
/***/ },
119+
/***/ }),
96120
/* 1 */
97-
/***/ function(module, exports, __webpack_require__) {
121+
/***/ (function(module, exports, __webpack_require__) {
98122

99123
"use strict";
100124

@@ -109,11 +133,11 @@ module.exports = function(options) { options = options || {};
109133

110134
var past = camelize(options.name || options.past || 'history'),
111135
future = camelize( options.future || 'future'),
112-
clear = camelize('clear-' + past),
113-
back = camelize(past + '-back'),
114-
forward = camelize(past + '-forward'),
115-
canBack = camelize('can-' + back),
116-
canForward = camelize('can-' + forward),
136+
clear = camelize.prepended('clear', past),
137+
back = camelize.prepended(past, 'back'),
138+
forward = camelize.prepended(past, 'forward'),
139+
canBack = camelize.prepended('can', back),
140+
canForward = camelize.prepended('can', forward),
117141
max = options.max;
118142

119143
var plugin = {
@@ -182,6 +206,6 @@ module.exports = function(options) { options = options || {};
182206
}
183207

184208

185-
/***/ }
209+
/***/ })
186210
/******/ ]);
187211
});

dist/state-machine-history.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.

dist/state-machine-visualize.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,41 @@
1111
return /******/ (function(modules) { // webpackBootstrap
1212
/******/ // The module cache
1313
/******/ var installedModules = {};
14-
14+
/******/
1515
/******/ // The require function
1616
/******/ function __webpack_require__(moduleId) {
17-
17+
/******/
1818
/******/ // Check if module is in cache
19-
/******/ if(installedModules[moduleId])
19+
/******/ if(installedModules[moduleId]) {
2020
/******/ return installedModules[moduleId].exports;
21-
21+
/******/ }
2222
/******/ // Create a new module (and put it into the cache)
2323
/******/ var module = installedModules[moduleId] = {
2424
/******/ i: moduleId,
2525
/******/ l: false,
2626
/******/ exports: {}
2727
/******/ };
28-
28+
/******/
2929
/******/ // Execute the module function
3030
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31-
31+
/******/
3232
/******/ // Flag the module as loaded
3333
/******/ module.l = true;
34-
34+
/******/
3535
/******/ // Return the exports of the module
3636
/******/ return module.exports;
3737
/******/ }
38-
39-
38+
/******/
39+
/******/
4040
/******/ // expose the modules object (__webpack_modules__)
4141
/******/ __webpack_require__.m = modules;
42-
42+
/******/
4343
/******/ // expose the module cache
4444
/******/ __webpack_require__.c = installedModules;
45-
45+
/******/
4646
/******/ // identity function for calling harmony imports with the correct context
4747
/******/ __webpack_require__.i = function(value) { return value; };
48-
48+
/******/
4949
/******/ // define getter function for harmony exports
5050
/******/ __webpack_require__.d = function(exports, name, getter) {
5151
/******/ if(!__webpack_require__.o(exports, name)) {
@@ -56,7 +56,7 @@ return /******/ (function(modules) { // webpackBootstrap
5656
/******/ });
5757
/******/ }
5858
/******/ };
59-
59+
/******/
6060
/******/ // getDefaultExport function for compatibility with non-harmony modules
6161
/******/ __webpack_require__.n = function(module) {
6262
/******/ var getter = module && module.__esModule ?
@@ -65,20 +65,20 @@ return /******/ (function(modules) { // webpackBootstrap
6565
/******/ __webpack_require__.d(getter, 'a', getter);
6666
/******/ return getter;
6767
/******/ };
68-
68+
/******/
6969
/******/ // Object.prototype.hasOwnProperty.call
7070
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
71-
71+
/******/
7272
/******/ // __webpack_public_path__
7373
/******/ __webpack_require__.p = "";
74-
74+
/******/
7575
/******/ // Load entry module and return exports
7676
/******/ return __webpack_require__(__webpack_require__.s = 1);
7777
/******/ })
7878
/************************************************************************/
7979
/******/ ([
8080
/* 0 */
81-
/***/ function(module, exports, __webpack_require__) {
81+
/***/ (function(module, exports, __webpack_require__) {
8282

8383
"use strict";
8484

@@ -96,9 +96,9 @@ module.exports = function(target, sources) {
9696
}
9797

9898

99-
/***/ },
99+
/***/ }),
100100
/* 1 */
101-
/***/ function(module, exports, __webpack_require__) {
101+
/***/ (function(module, exports, __webpack_require__) {
102102

103103
"use strict";
104104

@@ -264,6 +264,6 @@ module.exports = visualize;
264264
//-------------------------------------------------------------------------------------------------
265265

266266

267-
/***/ }
267+
/***/ })
268268
/******/ ]);
269269
});

dist/state-machine-visualize.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.

0 commit comments

Comments
 (0)