taskchef 3.0.1 → 3.0.3

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.
Files changed (49) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/BACKLOG.md +15 -0
  3. package/README.md +28 -7
  4. package/SPEC.md +79 -33
  5. package/index.js +18 -0
  6. package/node_modules/graceful-fs/LICENSE +15 -0
  7. package/node_modules/graceful-fs/README.md +143 -0
  8. package/node_modules/graceful-fs/clone.js +23 -0
  9. package/node_modules/graceful-fs/graceful-fs.js +448 -0
  10. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  11. package/node_modules/graceful-fs/package.json +53 -0
  12. package/node_modules/graceful-fs/polyfills.js +355 -0
  13. package/node_modules/proper-lockfile/CHANGELOG.md +108 -0
  14. package/node_modules/proper-lockfile/LICENSE +21 -0
  15. package/node_modules/proper-lockfile/README.md +183 -0
  16. package/node_modules/proper-lockfile/index.js +40 -0
  17. package/node_modules/proper-lockfile/lib/adapter.js +85 -0
  18. package/node_modules/proper-lockfile/lib/lockfile.js +342 -0
  19. package/node_modules/proper-lockfile/lib/mtime-precision.js +55 -0
  20. package/node_modules/proper-lockfile/package.json +71 -0
  21. package/node_modules/retry/.npmignore +3 -0
  22. package/node_modules/retry/.travis.yml +15 -0
  23. package/node_modules/retry/License +21 -0
  24. package/node_modules/retry/Makefile +18 -0
  25. package/node_modules/retry/README.md +227 -0
  26. package/node_modules/retry/equation.gif +0 -0
  27. package/node_modules/retry/example/dns.js +31 -0
  28. package/node_modules/retry/example/stop.js +40 -0
  29. package/node_modules/retry/index.js +1 -0
  30. package/node_modules/retry/lib/retry.js +100 -0
  31. package/node_modules/retry/lib/retry_operation.js +158 -0
  32. package/node_modules/retry/package.json +32 -0
  33. package/node_modules/retry/test/common.js +10 -0
  34. package/node_modules/retry/test/integration/test-forever.js +24 -0
  35. package/node_modules/retry/test/integration/test-retry-operation.js +258 -0
  36. package/node_modules/retry/test/integration/test-retry-wrap.js +101 -0
  37. package/node_modules/retry/test/integration/test-timeouts.js +69 -0
  38. package/node_modules/signal-exit/LICENSE.txt +16 -0
  39. package/node_modules/signal-exit/README.md +39 -0
  40. package/node_modules/signal-exit/index.js +202 -0
  41. package/node_modules/signal-exit/package.json +38 -0
  42. package/node_modules/signal-exit/signals.js +53 -0
  43. package/package.json +5 -2
  44. package/skills/taskchef-bootstrap/SKILL.md +2 -3
  45. package/skills/taskchef-delegate/SKILL.md +75 -11
  46. package/skills/taskchef-report/SKILL.md +20 -10
  47. package/src/cli.js +19 -1
  48. package/src/delegation.js +555 -0
  49. package/src/workspace.js +53 -172
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ const lockfile = require('./lib/lockfile');
4
+ const { toPromise, toSync, toSyncOptions } = require('./lib/adapter');
5
+
6
+ async function lock(file, options) {
7
+ const release = await toPromise(lockfile.lock)(file, options);
8
+
9
+ return toPromise(release);
10
+ }
11
+
12
+ function lockSync(file, options) {
13
+ const release = toSync(lockfile.lock)(file, toSyncOptions(options));
14
+
15
+ return toSync(release);
16
+ }
17
+
18
+ function unlock(file, options) {
19
+ return toPromise(lockfile.unlock)(file, options);
20
+ }
21
+
22
+ function unlockSync(file, options) {
23
+ return toSync(lockfile.unlock)(file, toSyncOptions(options));
24
+ }
25
+
26
+ function check(file, options) {
27
+ return toPromise(lockfile.check)(file, options);
28
+ }
29
+
30
+ function checkSync(file, options) {
31
+ return toSync(lockfile.check)(file, toSyncOptions(options));
32
+ }
33
+
34
+ module.exports = lock;
35
+ module.exports.lock = lock;
36
+ module.exports.unlock = unlock;
37
+ module.exports.lockSync = lockSync;
38
+ module.exports.unlockSync = unlockSync;
39
+ module.exports.check = check;
40
+ module.exports.checkSync = checkSync;
@@ -0,0 +1,85 @@
1
+ 'use strict';
2
+
3
+ const fs = require('graceful-fs');
4
+
5
+ function createSyncFs(fs) {
6
+ const methods = ['mkdir', 'realpath', 'stat', 'rmdir', 'utimes'];
7
+ const newFs = { ...fs };
8
+
9
+ methods.forEach((method) => {
10
+ newFs[method] = (...args) => {
11
+ const callback = args.pop();
12
+ let ret;
13
+
14
+ try {
15
+ ret = fs[`${method}Sync`](...args);
16
+ } catch (err) {
17
+ return callback(err);
18
+ }
19
+
20
+ callback(null, ret);
21
+ };
22
+ });
23
+
24
+ return newFs;
25
+ }
26
+
27
+ // ----------------------------------------------------------
28
+
29
+ function toPromise(method) {
30
+ return (...args) => new Promise((resolve, reject) => {
31
+ args.push((err, result) => {
32
+ if (err) {
33
+ reject(err);
34
+ } else {
35
+ resolve(result);
36
+ }
37
+ });
38
+
39
+ method(...args);
40
+ });
41
+ }
42
+
43
+ function toSync(method) {
44
+ return (...args) => {
45
+ let err;
46
+ let result;
47
+
48
+ args.push((_err, _result) => {
49
+ err = _err;
50
+ result = _result;
51
+ });
52
+
53
+ method(...args);
54
+
55
+ if (err) {
56
+ throw err;
57
+ }
58
+
59
+ return result;
60
+ };
61
+ }
62
+
63
+ function toSyncOptions(options) {
64
+ // Shallow clone options because we are oging to mutate them
65
+ options = { ...options };
66
+
67
+ // Transform fs to use the sync methods instead
68
+ options.fs = createSyncFs(options.fs || fs);
69
+
70
+ // Retries are not allowed because it requires the flow to be sync
71
+ if (
72
+ (typeof options.retries === 'number' && options.retries > 0) ||
73
+ (options.retries && typeof options.retries.retries === 'number' && options.retries.retries > 0)
74
+ ) {
75
+ throw Object.assign(new Error('Cannot use retries with the sync api'), { code: 'ESYNC' });
76
+ }
77
+
78
+ return options;
79
+ }
80
+
81
+ module.exports = {
82
+ toPromise,
83
+ toSync,
84
+ toSyncOptions,
85
+ };
@@ -0,0 +1,342 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const fs = require('graceful-fs');
5
+ const retry = require('retry');
6
+ const onExit = require('signal-exit');
7
+ const mtimePrecision = require('./mtime-precision');
8
+
9
+ const locks = {};
10
+
11
+ function getLockFile(file, options) {
12
+ return options.lockfilePath || `${file}.lock`;
13
+ }
14
+
15
+ function resolveCanonicalPath(file, options, callback) {
16
+ if (!options.realpath) {
17
+ return callback(null, path.resolve(file));
18
+ }
19
+
20
+ // Use realpath to resolve symlinks
21
+ // It also resolves relative paths
22
+ options.fs.realpath(file, callback);
23
+ }
24
+
25
+ function acquireLock(file, options, callback) {
26
+ const lockfilePath = getLockFile(file, options);
27
+
28
+ // Use mkdir to create the lockfile (atomic operation)
29
+ options.fs.mkdir(lockfilePath, (err) => {
30
+ if (!err) {
31
+ // At this point, we acquired the lock!
32
+ // Probe the mtime precision
33
+ return mtimePrecision.probe(lockfilePath, options.fs, (err, mtime, mtimePrecision) => {
34
+ // If it failed, try to remove the lock..
35
+ /* istanbul ignore if */
36
+ if (err) {
37
+ options.fs.rmdir(lockfilePath, () => {});
38
+
39
+ return callback(err);
40
+ }
41
+
42
+ callback(null, mtime, mtimePrecision);
43
+ });
44
+ }
45
+
46
+ // If error is not EEXIST then some other error occurred while locking
47
+ if (err.code !== 'EEXIST') {
48
+ return callback(err);
49
+ }
50
+
51
+ // Otherwise, check if lock is stale by analyzing the file mtime
52
+ if (options.stale <= 0) {
53
+ return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
54
+ }
55
+
56
+ options.fs.stat(lockfilePath, (err, stat) => {
57
+ if (err) {
58
+ // Retry if the lockfile has been removed (meanwhile)
59
+ // Skip stale check to avoid recursiveness
60
+ if (err.code === 'ENOENT') {
61
+ return acquireLock(file, { ...options, stale: 0 }, callback);
62
+ }
63
+
64
+ return callback(err);
65
+ }
66
+
67
+ if (!isLockStale(stat, options)) {
68
+ return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
69
+ }
70
+
71
+ // If it's stale, remove it and try again!
72
+ // Skip stale check to avoid recursiveness
73
+ removeLock(file, options, (err) => {
74
+ if (err) {
75
+ return callback(err);
76
+ }
77
+
78
+ acquireLock(file, { ...options, stale: 0 }, callback);
79
+ });
80
+ });
81
+ });
82
+ }
83
+
84
+ function isLockStale(stat, options) {
85
+ return stat.mtime.getTime() < Date.now() - options.stale;
86
+ }
87
+
88
+ function removeLock(file, options, callback) {
89
+ // Remove lockfile, ignoring ENOENT errors
90
+ options.fs.rmdir(getLockFile(file, options), (err) => {
91
+ if (err && err.code !== 'ENOENT') {
92
+ return callback(err);
93
+ }
94
+
95
+ callback();
96
+ });
97
+ }
98
+
99
+ function updateLock(file, options) {
100
+ const lock = locks[file];
101
+
102
+ // Just for safety, should never happen
103
+ /* istanbul ignore if */
104
+ if (lock.updateTimeout) {
105
+ return;
106
+ }
107
+
108
+ lock.updateDelay = lock.updateDelay || options.update;
109
+ lock.updateTimeout = setTimeout(() => {
110
+ lock.updateTimeout = null;
111
+
112
+ // Stat the file to check if mtime is still ours
113
+ // If it is, we can still recover from a system sleep or a busy event loop
114
+ options.fs.stat(lock.lockfilePath, (err, stat) => {
115
+ const isOverThreshold = lock.lastUpdate + options.stale < Date.now();
116
+
117
+ // If it failed to update the lockfile, keep trying unless
118
+ // the lockfile was deleted or we are over the threshold
119
+ if (err) {
120
+ if (err.code === 'ENOENT' || isOverThreshold) {
121
+ return setLockAsCompromised(file, lock, Object.assign(err, { code: 'ECOMPROMISED' }));
122
+ }
123
+
124
+ lock.updateDelay = 1000;
125
+
126
+ return updateLock(file, options);
127
+ }
128
+
129
+ const isMtimeOurs = lock.mtime.getTime() === stat.mtime.getTime();
130
+
131
+ if (!isMtimeOurs) {
132
+ return setLockAsCompromised(
133
+ file,
134
+ lock,
135
+ Object.assign(
136
+ new Error('Unable to update lock within the stale threshold'),
137
+ { code: 'ECOMPROMISED' }
138
+ ));
139
+ }
140
+
141
+ const mtime = mtimePrecision.getMtime(lock.mtimePrecision);
142
+
143
+ options.fs.utimes(lock.lockfilePath, mtime, mtime, (err) => {
144
+ const isOverThreshold = lock.lastUpdate + options.stale < Date.now();
145
+
146
+ // Ignore if the lock was released
147
+ if (lock.released) {
148
+ return;
149
+ }
150
+
151
+ // If it failed to update the lockfile, keep trying unless
152
+ // the lockfile was deleted or we are over the threshold
153
+ if (err) {
154
+ if (err.code === 'ENOENT' || isOverThreshold) {
155
+ return setLockAsCompromised(file, lock, Object.assign(err, { code: 'ECOMPROMISED' }));
156
+ }
157
+
158
+ lock.updateDelay = 1000;
159
+
160
+ return updateLock(file, options);
161
+ }
162
+
163
+ // All ok, keep updating..
164
+ lock.mtime = mtime;
165
+ lock.lastUpdate = Date.now();
166
+ lock.updateDelay = null;
167
+ updateLock(file, options);
168
+ });
169
+ });
170
+ }, lock.updateDelay);
171
+
172
+ // Unref the timer so that the nodejs process can exit freely
173
+ // This is safe because all acquired locks will be automatically released
174
+ // on process exit
175
+
176
+ // We first check that `lock.updateTimeout.unref` exists because some users
177
+ // may be using this module outside of NodeJS (e.g., in an electron app),
178
+ // and in those cases `setTimeout` return an integer.
179
+ /* istanbul ignore else */
180
+ if (lock.updateTimeout.unref) {
181
+ lock.updateTimeout.unref();
182
+ }
183
+ }
184
+
185
+ function setLockAsCompromised(file, lock, err) {
186
+ // Signal the lock has been released
187
+ lock.released = true;
188
+
189
+ // Cancel lock mtime update
190
+ // Just for safety, at this point updateTimeout should be null
191
+ /* istanbul ignore if */
192
+ if (lock.updateTimeout) {
193
+ clearTimeout(lock.updateTimeout);
194
+ }
195
+
196
+ if (locks[file] === lock) {
197
+ delete locks[file];
198
+ }
199
+
200
+ lock.options.onCompromised(err);
201
+ }
202
+
203
+ // ----------------------------------------------------------
204
+
205
+ function lock(file, options, callback) {
206
+ /* istanbul ignore next */
207
+ options = {
208
+ stale: 10000,
209
+ update: null,
210
+ realpath: true,
211
+ retries: 0,
212
+ fs,
213
+ onCompromised: (err) => { throw err; },
214
+ ...options,
215
+ };
216
+
217
+ options.retries = options.retries || 0;
218
+ options.retries = typeof options.retries === 'number' ? { retries: options.retries } : options.retries;
219
+ options.stale = Math.max(options.stale || 0, 2000);
220
+ options.update = options.update == null ? options.stale / 2 : options.update || 0;
221
+ options.update = Math.max(Math.min(options.update, options.stale / 2), 1000);
222
+
223
+ // Resolve to a canonical file path
224
+ resolveCanonicalPath(file, options, (err, file) => {
225
+ if (err) {
226
+ return callback(err);
227
+ }
228
+
229
+ // Attempt to acquire the lock
230
+ const operation = retry.operation(options.retries);
231
+
232
+ operation.attempt(() => {
233
+ acquireLock(file, options, (err, mtime, mtimePrecision) => {
234
+ if (operation.retry(err)) {
235
+ return;
236
+ }
237
+
238
+ if (err) {
239
+ return callback(operation.mainError());
240
+ }
241
+
242
+ // We now own the lock
243
+ const lock = locks[file] = {
244
+ lockfilePath: getLockFile(file, options),
245
+ mtime,
246
+ mtimePrecision,
247
+ options,
248
+ lastUpdate: Date.now(),
249
+ };
250
+
251
+ // We must keep the lock fresh to avoid staleness
252
+ updateLock(file, options);
253
+
254
+ callback(null, (releasedCallback) => {
255
+ if (lock.released) {
256
+ return releasedCallback &&
257
+ releasedCallback(Object.assign(new Error('Lock is already released'), { code: 'ERELEASED' }));
258
+ }
259
+
260
+ // Not necessary to use realpath twice when unlocking
261
+ unlock(file, { ...options, realpath: false }, releasedCallback);
262
+ });
263
+ });
264
+ });
265
+ });
266
+ }
267
+
268
+ function unlock(file, options, callback) {
269
+ options = {
270
+ fs,
271
+ realpath: true,
272
+ ...options,
273
+ };
274
+
275
+ // Resolve to a canonical file path
276
+ resolveCanonicalPath(file, options, (err, file) => {
277
+ if (err) {
278
+ return callback(err);
279
+ }
280
+
281
+ // Skip if the lock is not acquired
282
+ const lock = locks[file];
283
+
284
+ if (!lock) {
285
+ return callback(Object.assign(new Error('Lock is not acquired/owned by you'), { code: 'ENOTACQUIRED' }));
286
+ }
287
+
288
+ lock.updateTimeout && clearTimeout(lock.updateTimeout); // Cancel lock mtime update
289
+ lock.released = true; // Signal the lock has been released
290
+ delete locks[file]; // Delete from locks
291
+
292
+ removeLock(file, options, callback);
293
+ });
294
+ }
295
+
296
+ function check(file, options, callback) {
297
+ options = {
298
+ stale: 10000,
299
+ realpath: true,
300
+ fs,
301
+ ...options,
302
+ };
303
+
304
+ options.stale = Math.max(options.stale || 0, 2000);
305
+
306
+ // Resolve to a canonical file path
307
+ resolveCanonicalPath(file, options, (err, file) => {
308
+ if (err) {
309
+ return callback(err);
310
+ }
311
+
312
+ // Check if lockfile exists
313
+ options.fs.stat(getLockFile(file, options), (err, stat) => {
314
+ if (err) {
315
+ // If does not exist, file is not locked. Otherwise, callback with error
316
+ return err.code === 'ENOENT' ? callback(null, false) : callback(err);
317
+ }
318
+
319
+ // Otherwise, check if lock is stale by analyzing the file mtime
320
+ return callback(null, !isLockStale(stat, options));
321
+ });
322
+ });
323
+ }
324
+
325
+ function getLocks() {
326
+ return locks;
327
+ }
328
+
329
+ // Remove acquired locks on exit
330
+ /* istanbul ignore next */
331
+ onExit(() => {
332
+ for (const file in locks) {
333
+ const options = locks[file].options;
334
+
335
+ try { options.fs.rmdirSync(getLockFile(file, options)); } catch (e) { /* Empty */ }
336
+ }
337
+ });
338
+
339
+ module.exports.lock = lock;
340
+ module.exports.unlock = unlock;
341
+ module.exports.check = check;
342
+ module.exports.getLocks = getLocks;
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ const cacheSymbol = Symbol();
4
+
5
+ function probe(file, fs, callback) {
6
+ const cachedPrecision = fs[cacheSymbol];
7
+
8
+ if (cachedPrecision) {
9
+ return fs.stat(file, (err, stat) => {
10
+ /* istanbul ignore if */
11
+ if (err) {
12
+ return callback(err);
13
+ }
14
+
15
+ callback(null, stat.mtime, cachedPrecision);
16
+ });
17
+ }
18
+
19
+ // Set mtime by ceiling Date.now() to seconds + 5ms so that it's "not on the second"
20
+ const mtime = new Date((Math.ceil(Date.now() / 1000) * 1000) + 5);
21
+
22
+ fs.utimes(file, mtime, mtime, (err) => {
23
+ /* istanbul ignore if */
24
+ if (err) {
25
+ return callback(err);
26
+ }
27
+
28
+ fs.stat(file, (err, stat) => {
29
+ /* istanbul ignore if */
30
+ if (err) {
31
+ return callback(err);
32
+ }
33
+
34
+ const precision = stat.mtime.getTime() % 1000 === 0 ? 's' : 'ms';
35
+
36
+ // Cache the precision in a non-enumerable way
37
+ Object.defineProperty(fs, cacheSymbol, { value: precision });
38
+
39
+ callback(null, stat.mtime, precision);
40
+ });
41
+ });
42
+ }
43
+
44
+ function getMtime(precision) {
45
+ let now = Date.now();
46
+
47
+ if (precision === 's') {
48
+ now = Math.ceil(now / 1000) * 1000;
49
+ }
50
+
51
+ return new Date(now);
52
+ }
53
+
54
+ module.exports.probe = probe;
55
+ module.exports.getMtime = getMtime;
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "proper-lockfile",
3
+ "version": "4.1.2",
4
+ "description": "A inter-process and inter-machine lockfile utility that works on a local or network file system",
5
+ "keywords": [
6
+ "lock",
7
+ "locking",
8
+ "file",
9
+ "lockfile",
10
+ "fs",
11
+ "cross-process"
12
+ ],
13
+ "author": "André Cruz <andre@moxy.studio>",
14
+ "homepage": "https://github.com/moxystudio/node-proper-lockfile",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git@github.com:moxystudio/node-proper-lockfile.git"
18
+ },
19
+ "license": "MIT",
20
+ "main": "index.js",
21
+ "files": [
22
+ "lib"
23
+ ],
24
+ "scripts": {
25
+ "lint": "eslint .",
26
+ "test": "jest --env node --coverage --runInBand",
27
+ "prerelease": "npm t && npm run lint",
28
+ "release": "standard-version",
29
+ "postrelease": "git push --follow-tags origin HEAD && npm publish"
30
+ },
31
+ "husky": {
32
+ "hooks": {
33
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
34
+ "pre-commit": "lint-staged"
35
+ }
36
+ },
37
+ "lint-staged": {
38
+ "*.js": [
39
+ "eslint --fix",
40
+ "git add"
41
+ ]
42
+ },
43
+ "commitlint": {
44
+ "extends": [
45
+ "@commitlint/config-conventional"
46
+ ]
47
+ },
48
+ "dependencies": {
49
+ "graceful-fs": "^4.2.4",
50
+ "retry": "^0.12.0",
51
+ "signal-exit": "^3.0.2"
52
+ },
53
+ "devDependencies": {
54
+ "@commitlint/cli": "^7.0.0",
55
+ "@commitlint/config-conventional": "^7.0.1",
56
+ "@segment/clear-timeouts": "^2.0.0",
57
+ "delay": "^4.1.0",
58
+ "eslint": "^5.3.0",
59
+ "eslint-config-moxy": "^7.1.0",
60
+ "execa": "^1.0.0",
61
+ "husky": "^1.1.4",
62
+ "jest": "^24.5.0",
63
+ "lint-staged": "^8.0.4",
64
+ "mkdirp": "^0.5.1",
65
+ "p-defer": "^2.1.0",
66
+ "rimraf": "^2.6.2",
67
+ "stable": "^0.1.8",
68
+ "standard-version": "^5.0.0",
69
+ "thread-sleep": "^2.1.0"
70
+ }
71
+ }
@@ -0,0 +1,3 @@
1
+ /node_modules/*
2
+ npm-debug.log
3
+ coverage
@@ -0,0 +1,15 @@
1
+ language: node_js
2
+ node_js:
3
+ - "4"
4
+ before_install:
5
+ - pip install --user codecov
6
+ after_success:
7
+ - codecov --file coverage/lcov.info --disable search
8
+ # travis encrypt [subdomain]:[api token]@[room id]
9
+ # notifications:
10
+ # email: false
11
+ # campfire:
12
+ # rooms:
13
+ # secure: xyz
14
+ # on_failure: always
15
+ # on_success: always
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2011:
2
+ Tim Koschützki (tim@debuggable.com)
3
+ Felix Geisendörfer (felix@debuggable.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ SHELL := /bin/bash
2
+
3
+ release-major: test
4
+ npm version major -m "Release %s"
5
+ git push
6
+ npm publish
7
+
8
+ release-minor: test
9
+ npm version minor -m "Release %s"
10
+ git push
11
+ npm publish
12
+
13
+ release-patch: test
14
+ npm version patch -m "Release %s"
15
+ git push
16
+ npm publish
17
+
18
+ .PHONY: test release-major release-minor release-patch