@keepsnappy/react-native 0.1.0-alpha.14 → 0.1.0-alpha.16
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/README.md +12 -0
- package/js/babel-transformer.js +24 -6
- package/js/component-contract.cjs +14 -0
- package/js/component-stamps.js +192 -0
- package/js/sdk/bytes.ts +20 -0
- package/js/sdk/core.ts +55 -14
- package/js/sdk/device-model.ts +10 -0
- package/js/sdk/fiber.ts +282 -28
- package/js/sdk/interactions.ts +23 -20
- package/js/sdk/place.ts +25 -0
- package/js/sdk/profile-export.ts +15 -0
- package/js/sdk/profile.ts +272 -18
- package/js/sdk/push-install.ts +2 -1
- package/js/sdk/push.ts +3 -19
- package/js/sdk/screens.ts +83 -4
- package/metro.js +11 -1
- package/package.json +1 -1
package/metro.js
CHANGED
|
@@ -175,7 +175,7 @@ const resolveEntry = projectRoot => {
|
|
|
175
175
|
return null;
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
function withKeepSnappy(input) {
|
|
178
|
+
function withKeepSnappy(input, { clientPackages = [] } = {}) {
|
|
179
179
|
if (!isEnabled()) {
|
|
180
180
|
return isProfiling() ? withReactProfiling(input) : input;
|
|
181
181
|
}
|
|
@@ -201,13 +201,23 @@ function withKeepSnappy(input) {
|
|
|
201
201
|
process.env[ENV_UPSTREAM] = upstream;
|
|
202
202
|
process.env[ENV_ENTRY] = entry;
|
|
203
203
|
process.env[ENV_BOOT] = BOOT_PATH;
|
|
204
|
+
const packages = [...new Set(clientPackages)].sort();
|
|
205
|
+
process.env.KEEPSNAPPY_CLIENT_PACKAGES = JSON.stringify(packages);
|
|
206
|
+
process.env.KEEPSNAPPY_PROJECT_ROOT = projectRoot;
|
|
207
|
+
process.env.KEEPSNAPPY_COMPONENT_CACHE_KEY = require('./js/component-stamps.js').configure(projectRoot, packages);
|
|
204
208
|
|
|
205
209
|
const serializer = config.serializer ?? {};
|
|
206
210
|
const upstreamPolyfills = serializer.getPolyfills;
|
|
207
211
|
const upstreamPreMain = serializer.getModulesRunBeforeMainModule;
|
|
212
|
+
const resolver = config.resolver ?? {};
|
|
213
|
+
const blockList = resolver.blockList ? (Array.isArray(resolver.blockList) ? resolver.blockList : [resolver.blockList]) : [];
|
|
214
|
+
const escape = value => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
215
|
+
const roots = [...new Set([path.resolve(projectRoot), fs.realpathSync(projectRoot)])];
|
|
216
|
+
const inventory = new RegExp(`^(?:${roots.map(escape).join('|')})[/\\\\]\\.keepsnappy(?:[/\\\\]|$)`);
|
|
208
217
|
|
|
209
218
|
return {
|
|
210
219
|
...config,
|
|
220
|
+
resolver: { ...resolver, blockList: [...blockList, inventory] },
|
|
211
221
|
serializer: {
|
|
212
222
|
...serializer,
|
|
213
223
|
getPolyfills: options => [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keepsnappy/react-native",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.16",
|
|
4
4
|
"description": "KeepSnappy in-app SDK for React Native / Expo: zero-code measurement windows, React commit hook, native signposts and log file",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|