@ember-data/tracking 4.9.0 → 4.10.0-alpha.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.
@@ -1,5 +1,16 @@
1
1
  /**
2
+ * This package provides primitives that allow powerful low-level
3
+ * adjustments to change tracking notification behaviors.
4
+ *
5
+ * Typically you want to use these primitives when you want to divorce
6
+ * property accesses on EmberData provided objects from the current
7
+ * tracking context. Typically this sort of thing occurs when serializing
8
+ * tracked data to send in a request: the data itself is often ancillary
9
+ * to the thing which triggered the request in the first place and you
10
+ * would not want to re-trigger the request for any update to the data.
11
+ *
2
12
  * @module @ember-data/tracking
13
+ * @main @ember-data/tracking
3
14
  */
4
15
 
5
16
  let TRANSACTION = null;
@@ -76,6 +87,8 @@ function addTransactionCB(method) {
76
87
  *
77
88
  * @function untracked
78
89
  * @public
90
+ * @static
91
+ * @for @ember-data/tracking
79
92
  * @param method
80
93
  * @returns result of invoking method
81
94
  */
@@ -87,9 +100,18 @@ function untracked(method) {
87
100
  }
88
101
 
89
102
  /**
103
+ * Run the method, subscribing to any tracked properties
104
+ * managed by EmberData that were accessed or written during
105
+ * the method's execution as per-normal but while allowing
106
+ * interleaving of reads and writes.
107
+ *
108
+ * This is useful when for instance you want to perform
109
+ * a mutation based on existing state that must be read first.
90
110
  *
91
111
  * @function transact
92
112
  * @public
113
+ * @static
114
+ * @for @ember-data/tracking
93
115
  * @param method
94
116
  * @returns result of invoking method
95
117
  */
@@ -101,9 +123,14 @@ function transact(method) {
101
123
  }
102
124
 
103
125
  /**
126
+ * A helpful utility for creating a new function that
127
+ * always runs in a transaction. E.G. this "memoizes"
128
+ * calling `transact(fn)`, currying args as necessary.
104
129
  *
105
130
  * @method memoTransact
106
131
  * @public
132
+ * @static
133
+ * @for @ember-data/tracking
107
134
  * @param method
108
135
  * @returns a function that will invoke method in a transaction with any provided args and return its result
109
136
  */
@@ -115,6 +142,4 @@ function memoTransact(method) {
115
142
  return ret;
116
143
  };
117
144
  }
118
-
119
- export { addToTransaction, addTransactionCB, memoTransact, subscribe, transact, untracked };
120
- //# sourceMappingURL=-private.js.map
145
+ export { addToTransaction, addTransactionCB, memoTransact, subscribe, transact, untracked };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.js","sources":["../src/-private.ts"],"sourcesContent":["/**\n * This package provides primitives that allow powerful low-level\n * adjustments to change tracking notification behaviors.\n *\n * Typically you want to use these primitives when you want to divorce\n * property accesses on EmberData provided objects from the current\n * tracking context. Typically this sort of thing occurs when serializing\n * tracked data to send in a request: the data itself is often ancillary\n * to the thing which triggered the request in the first place and you\n * would not want to re-trigger the request for any update to the data.\n *\n * @module @ember-data/tracking\n * @main @ember-data/tracking\n */\ntype OpaqueFn = (...args: unknown[]) => unknown;\ntype Tag = { ref: null; t: boolean };\ntype Transaction = {\n cbs: Set<OpaqueFn>;\n props: Set<Tag>;\n sub: Set<Tag>;\n parent: Transaction | null;\n};\nlet TRANSACTION: Transaction | null = null;\n\nfunction createTransaction() {\n let transaction: Transaction = {\n cbs: new Set(),\n props: new Set(),\n sub: new Set(),\n parent: null,\n };\n if (TRANSACTION) {\n transaction.parent = TRANSACTION;\n }\n TRANSACTION = transaction;\n}\n\nexport function subscribe(obj: Tag): void {\n if (TRANSACTION) {\n TRANSACTION.sub.add(obj);\n } else {\n obj.ref;\n }\n}\n\nfunction flushTransaction() {\n let transaction = TRANSACTION!;\n TRANSACTION = transaction.parent;\n transaction.cbs.forEach((cb) => {\n cb();\n });\n transaction.props.forEach((obj: Tag) => {\n obj.t = true;\n obj.ref = null;\n });\n transaction.sub.forEach((obj: Tag) => {\n obj.ref;\n });\n}\nasync function untrack() {\n let transaction = TRANSACTION!;\n TRANSACTION = transaction.parent;\n\n // defer writes\n await Promise.resolve();\n transaction.cbs.forEach((cb) => {\n cb();\n });\n transaction.props.forEach((obj: Tag) => {\n obj.t = true;\n obj.ref = null;\n });\n}\n\nexport function addToTransaction(obj: Tag): void {\n if (TRANSACTION) {\n TRANSACTION.props.add(obj);\n } else {\n obj.ref = null;\n }\n}\nexport function addTransactionCB(method: OpaqueFn): void {\n if (TRANSACTION) {\n TRANSACTION.cbs.add(method);\n } else {\n method();\n }\n}\n\n/**\n * Run `method` without subscribing to any tracked properties\n * controlled by EmberData.\n *\n * This should rarely be used except by libraries that really\n * know what they are doing. It is most useful for wrapping\n * certain kinds of fetch/query logic from within a `Resource`\n * `hook` or other similar pattern.\n *\n * @function untracked\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @returns result of invoking method\n */\nexport function untracked<T extends OpaqueFn>(method: T): ReturnType<T> {\n createTransaction();\n const ret = method();\n void untrack();\n return ret as ReturnType<T>;\n}\n\n/**\n * Run the method, subscribing to any tracked properties\n * managed by EmberData that were accessed or written during\n * the method's execution as per-normal but while allowing\n * interleaving of reads and writes.\n *\n * This is useful when for instance you want to perform\n * a mutation based on existing state that must be read first.\n *\n * @function transact\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @returns result of invoking method\n */\nexport function transact<T extends OpaqueFn>(method: T): ReturnType<T> {\n createTransaction();\n const ret = method();\n flushTransaction();\n return ret as ReturnType<T>;\n}\n\n/**\n * A helpful utility for creating a new function that\n * always runs in a transaction. E.G. this \"memoizes\"\n * calling `transact(fn)`, currying args as necessary.\n *\n * @method memoTransact\n * @public\n * @static\n * @for @ember-data/tracking\n * @param method\n * @returns a function that will invoke method in a transaction with any provided args and return its result\n */\nexport function memoTransact<T extends OpaqueFn>(method: T): (...args: unknown[]) => ReturnType<T> {\n return function (...args: unknown[]) {\n createTransaction();\n const ret = method(...args);\n flushTransaction();\n return ret as ReturnType<T>;\n };\n}\n"],"names":["TRANSACTION","createTransaction","transaction","cbs","Set","props","sub","parent","subscribe","obj","add","ref","flushTransaction","forEach","cb","t","untrack","Promise","resolve","addToTransaction","addTransactionCB","method","untracked","ret","transact","memoTransact","args"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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EAAiB;AACrEpB,EAAAA,iBAAiB,EAAE,CAAA;EACnB,MAAMsB,GAAG,GAAGF,MAAM,EAAE,CAAA;AACpBT,EAAAA,gBAAgB,EAAE,CAAA;AAClB,EAAA,OAAOW,GAAG,CAAA;AACZ,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,YAAY,CAAqBJ,MAAS,EAAyC;EACjG,OAAO,UAAU,GAAGK,IAAe,EAAE;AACnCzB,IAAAA,iBAAiB,EAAE,CAAA;AACnB,IAAA,MAAMsB,GAAG,GAAGF,MAAM,CAAC,GAAGK,IAAI,CAAC,CAAA;AAC3Bd,IAAAA,gBAAgB,EAAE,CAAA;AAClB,IAAA,OAAOW,GAAG,CAAA;GACX,CAAA;AACH;;;;"}
package/addon/index.js ADDED
@@ -0,0 +1 @@
1
+ export { memoTransact, transact, untracked } from "./-private";
File without changes
package/addon-main.js CHANGED
@@ -1,21 +1,6 @@
1
- const path = require('path');
2
-
3
- const Funnel = require('broccoli-funnel');
4
-
5
1
  module.exports = {
6
2
  name: require('./package.json').name,
7
3
 
8
- options: {
9
- babel: {
10
- plugins: [require.resolve('./lib/transform-ext.js')],
11
- },
12
- },
13
-
14
- treeForAddon() {
15
- const assetDir = path.join(__dirname, './dist');
16
- return this._super.treeForAddon.call(this, new Funnel(assetDir, { include: ['**/*.js'] }));
17
- },
18
-
19
4
  treeForVendor() {
20
5
  return;
21
6
  },
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@ember-data/tracking",
3
3
  "description": "Tracking Primitives for controlling change notification of Tracked properties when working with EmberData",
4
- "version": "4.9.0",
4
+ "version": "4.10.0-alpha.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+ssh://git@github.com:emberjs/data.git",
11
- "directory": "addons/tracking"
11
+ "directory": "packages/tracking"
12
12
  },
13
13
  "homepage": "https://github.com/emberjs/data",
14
14
  "bugs": "https://github.com/emberjs/data/issues",
@@ -22,18 +22,11 @@
22
22
  "extends": "../../package.json"
23
23
  },
24
24
  "dependencies": {
25
- "broccoli-funnel": "^3.0.8",
26
25
  "ember-cli-babel": "^7.26.11"
27
26
  },
28
- "exports": {
29
- ".": "./dist/index.js",
30
- "./*": "./dist/*",
31
- "./addon-main.js": "./addon-main.js"
32
- },
33
27
  "files": [
34
- "lib",
35
28
  "addon-main.js",
36
- "dist"
29
+ "addon"
37
30
  ],
38
31
  "ember-addon": {
39
32
  "main": "addon-main.js",
@@ -41,19 +34,20 @@
41
34
  "version": 1
42
35
  },
43
36
  "devDependencies": {
44
- "@babel/core": "^7.19.6",
37
+ "@babel/core": "^7.20.2",
38
+ "@babel/cli": "^7.19.3",
45
39
  "@babel/plugin-proposal-class-properties": "^7.18.6",
46
- "@babel/plugin-proposal-decorators": "^7.20.0",
40
+ "@babel/plugin-proposal-decorators": "^7.20.2",
47
41
  "@babel/plugin-transform-runtime": "^7.19.6",
48
- "@babel/plugin-transform-typescript": "^7.20.0",
49
- "@babel/preset-env": "^7.19.4",
42
+ "@babel/plugin-transform-typescript": "^7.20.2",
43
+ "@babel/preset-env": "^7.20.2",
50
44
  "@babel/preset-typescript": "^7.18.6",
51
- "@babel/runtime": "^7.20.0",
52
- "@embroider/addon-dev": "^2.0.0",
53
- "@rollup/plugin-babel": "^6.0.2",
45
+ "@babel/runtime": "^7.20.1",
46
+ "@embroider/addon-dev": "^3.0.0",
47
+ "@rollup/plugin-babel": "^6.0.3",
54
48
  "@rollup/plugin-node-resolve": "^15.0.1",
55
- "rollup": "^3.2.3",
56
- "tslib": "^2.4.0",
49
+ "rollup": "^3.4.0",
50
+ "tslib": "^2.4.1",
57
51
  "typescript": "^4.8.4",
58
52
  "walk-sync": "^3.0.0"
59
53
  },
@@ -61,7 +55,7 @@
61
55
  "edition": "octane"
62
56
  },
63
57
  "scripts": {
64
- "build": "rollup --config",
58
+ "build": "rollup --config && babel ./addon --out-dir addon --plugins=../private-build-infra/src/transforms/babel-plugin-transform-ext.js",
65
59
  "start": "rollup --config --watch"
66
60
  }
67
61
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"-private.js","sources":["../src/-private.ts"],"sourcesContent":["/**\n * @module @ember-data/tracking\n */\ntype OpaqueFn = (...args: unknown[]) => unknown;\ntype Tag = { ref: null; t: boolean };\ntype Transaction = {\n cbs: Set<OpaqueFn>;\n props: Set<Tag>;\n sub: Set<Tag>;\n parent: Transaction | null;\n};\nlet TRANSACTION: Transaction | null = null;\n\nfunction createTransaction() {\n let transaction: Transaction = {\n cbs: new Set(),\n props: new Set(),\n sub: new Set(),\n parent: null,\n };\n if (TRANSACTION) {\n transaction.parent = TRANSACTION;\n }\n TRANSACTION = transaction;\n}\n\nexport function subscribe(obj: Tag): void {\n if (TRANSACTION) {\n TRANSACTION.sub.add(obj);\n } else {\n obj.ref;\n }\n}\n\nfunction flushTransaction() {\n let transaction = TRANSACTION!;\n TRANSACTION = transaction.parent;\n transaction.cbs.forEach((cb) => {\n cb();\n });\n transaction.props.forEach((obj: Tag) => {\n obj.t = true;\n obj.ref = null;\n });\n transaction.sub.forEach((obj: Tag) => {\n obj.ref;\n });\n}\nasync function untrack() {\n let transaction = TRANSACTION!;\n TRANSACTION = transaction.parent;\n\n // defer writes\n await Promise.resolve();\n transaction.cbs.forEach((cb) => {\n cb();\n });\n transaction.props.forEach((obj: Tag) => {\n obj.t = true;\n obj.ref = null;\n });\n}\n\nexport function addToTransaction(obj: Tag): void {\n if (TRANSACTION) {\n TRANSACTION.props.add(obj);\n } else {\n obj.ref = null;\n }\n}\nexport function addTransactionCB(method: OpaqueFn): void {\n if (TRANSACTION) {\n TRANSACTION.cbs.add(method);\n } else {\n method();\n }\n}\n\n/**\n * Run `method` without subscribing to any tracked properties\n * controlled by EmberData.\n *\n * This should rarely be used except by libraries that really\n * know what they are doing. It is most useful for wrapping\n * certain kinds of fetch/query logic from within a `Resource`\n * `hook` or other similar pattern.\n *\n * @function untracked\n * @public\n * @param method\n * @returns result of invoking method\n */\nexport function untracked<T extends OpaqueFn>(method: T): ReturnType<T> {\n createTransaction();\n const ret = method();\n void untrack();\n return ret as ReturnType<T>;\n}\n\n/**\n *\n * @function transact\n * @public\n * @param method\n * @returns result of invoking method\n */\nexport function transact<T extends OpaqueFn>(method: T): ReturnType<T> {\n createTransaction();\n const ret = method();\n flushTransaction();\n return ret as ReturnType<T>;\n}\n\n/**\n *\n * @method memoTransact\n * @public\n * @param method\n * @returns a function that will invoke method in a transaction with any provided args and return its result\n */\nexport function memoTransact<T extends OpaqueFn>(method: T): (...args: unknown[]) => ReturnType<T> {\n return function (...args: unknown[]) {\n createTransaction();\n const ret = method(...args);\n flushTransaction();\n return ret as ReturnType<T>;\n };\n}\n"],"names":["TRANSACTION","createTransaction","transaction","cbs","Set","props","sub","parent","subscribe","obj","add","ref","flushTransaction","forEach","cb","t","untrack","Promise","resolve","addToTransaction","addTransactionCB","method","untracked","ret","transact","memoTransact","args"],"mappings":"AAAA;AACA;AACA;;AASA,IAAIA,WAA+B,GAAG,IAAI,CAAA;AAE1C,SAASC,iBAAiB,GAAG;AAC3B,EAAA,IAAIC,WAAwB,GAAG;IAC7BC,GAAG,EAAE,IAAIC,GAAG,EAAE;IACdC,KAAK,EAAE,IAAID,GAAG,EAAE;IAChBE,GAAG,EAAE,IAAIF,GAAG,EAAE;AACdG,IAAAA,MAAM,EAAE,IAAA;GACT,CAAA;AACD,EAAA,IAAIP,WAAW,EAAE;IACfE,WAAW,CAACK,MAAM,GAAGP,WAAW,CAAA;AAClC,GAAA;AACAA,EAAAA,WAAW,GAAGE,WAAW,CAAA;AAC3B,CAAA;AAEO,SAASM,SAAS,CAACC,GAAQ,EAAQ;AACxC,EAAA,IAAIT,WAAW,EAAE;AACfA,IAAAA,WAAW,CAACM,GAAG,CAACI,GAAG,CAACD,GAAG,CAAC,CAAA;AAC1B,GAA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GAAC,MAAM;IACLA,GAAG,CAACE,GAAG,GAAG,IAAI,CAAA;AAChB,GAAA;AACF,CAAA;AACO,SAASS,gBAAgB,CAACC,MAAgB,EAAQ;AACvD,EAAA,IAAIrB,WAAW,EAAE;AACfA,IAAAA,WAAW,CAACG,GAAG,CAACO,GAAG,CAACW,MAAM,CAAC,CAAA;AAC7B,GAAC,MAAM;AACLA,IAAAA,MAAM,EAAE,CAAA;AACV,GAAA;AACF,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,SAAS,CAAqBD,MAAS,EAAiB;AACtEpB,EAAAA,iBAAiB,EAAE,CAAA;EACnB,MAAMsB,GAAG,GAAGF,MAAM,EAAE,CAAA;AACpB,EAAA,KAAKL,OAAO,EAAE,CAAA;AACd,EAAA,OAAOO,GAAG,CAAA;AACZ,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQ,CAAqBH,MAAS,EAAiB;AACrEpB,EAAAA,iBAAiB,EAAE,CAAA;EACnB,MAAMsB,GAAG,GAAGF,MAAM,EAAE,CAAA;AACpBT,EAAAA,gBAAgB,EAAE,CAAA;AAClB,EAAA,OAAOW,GAAG,CAAA;AACZ,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,YAAY,CAAqBJ,MAAS,EAAyC;EACjG,OAAO,UAAU,GAAGK,IAAe,EAAE;AACnCzB,IAAAA,iBAAiB,EAAE,CAAA;AACnB,IAAA,MAAMsB,GAAG,GAAGF,MAAM,CAAC,GAAGK,IAAI,CAAC,CAAA;AAC3Bd,IAAAA,gBAAgB,EAAE,CAAA;AAClB,IAAA,OAAOW,GAAG,CAAA;GACX,CAAA;AACH;;;;"}
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export { memoTransact, transact, untracked } from './-private.js';
2
- //# sourceMappingURL=index.js.map
@@ -1,16 +0,0 @@
1
- module.exports = function () {
2
- return {
3
- name: '@ember-data/v1-addon-shim/transform-ext',
4
- visitor: {
5
- Program(path) {
6
- path.node.body.forEach((node) => {
7
- if (node.type === 'ImportDeclaration' || (node.type === 'ExportNamedDeclaration' && node.source)) {
8
- if (node.source.value.endsWith('.js')) {
9
- node.source.value = node.source.value.replace('.js', '');
10
- }
11
- }
12
- });
13
- },
14
- },
15
- };
16
- };