isomorphic-jj 1.3.0 → 1.4.0
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 +1 -0
package/package.json
CHANGED
package/src/api/repository.js
CHANGED
|
@@ -1084,6 +1084,11 @@ export async function createJJ(options) {
|
|
|
1084
1084
|
change.timestamp = new Date().toISOString();
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
|
+
// Update metadata
|
|
1088
|
+
if (args.metadata !== undefined) {
|
|
1089
|
+
change.metadata = args.metadata;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1087
1092
|
// Only snapshot files if describing working copy
|
|
1088
1093
|
if (isWorkingCopy) {
|
|
1089
1094
|
// Snapshot current file contents for conflict detection
|
|
@@ -1688,10 +1693,11 @@ export async function createJJ(options) {
|
|
|
1688
1693
|
* @param {Object} [args={}] - Arguments
|
|
1689
1694
|
* @param {string} [args.message] - Description for current change
|
|
1690
1695
|
* @param {Object} [args.author] - Author for current change
|
|
1696
|
+
* @param {Object} [args.metadata] - Metadata to attach to the change
|
|
1691
1697
|
* @returns {Promise<Object>} The newly created change
|
|
1692
1698
|
*/
|
|
1693
1699
|
async commit(args = {}) {
|
|
1694
|
-
await this.describe({ message: args.message, author: args.author });
|
|
1700
|
+
await this.describe({ message: args.message, author: args.author, metadata: args.metadata });
|
|
1695
1701
|
return await this.new({ message: args.nextMessage });
|
|
1696
1702
|
},
|
|
1697
1703
|
|