isomorphic-jj 1.3.0 → 1.4.1
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/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +27 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/repository.js +7 -1
- package/src/types.d.ts +3 -0
package/dist/index.cjs
CHANGED
|
@@ -6622,6 +6622,11 @@ async function createJJ(options) {
|
|
|
6622
6622
|
change.timestamp = new Date().toISOString();
|
|
6623
6623
|
}
|
|
6624
6624
|
|
|
6625
|
+
// Update metadata
|
|
6626
|
+
if (args.metadata !== undefined) {
|
|
6627
|
+
change.metadata = args.metadata;
|
|
6628
|
+
}
|
|
6629
|
+
|
|
6625
6630
|
// Only snapshot files if describing working copy
|
|
6626
6631
|
if (isWorkingCopy) {
|
|
6627
6632
|
// Snapshot current file contents for conflict detection
|
|
@@ -7226,10 +7231,11 @@ async function createJJ(options) {
|
|
|
7226
7231
|
* @param {Object} [args={}] - Arguments
|
|
7227
7232
|
* @param {string} [args.message] - Description for current change
|
|
7228
7233
|
* @param {Object} [args.author] - Author for current change
|
|
7234
|
+
* @param {Object} [args.metadata] - Metadata to attach to the change
|
|
7229
7235
|
* @returns {Promise<Object>} The newly created change
|
|
7230
7236
|
*/
|
|
7231
7237
|
async commit(args = {}) {
|
|
7232
|
-
await this.describe({ message: args.message, author: args.author });
|
|
7238
|
+
await this.describe({ message: args.message, author: args.author, metadata: args.metadata });
|
|
7233
7239
|
return await this.new({ message: args.nextMessage });
|
|
7234
7240
|
},
|
|
7235
7241
|
|