From 5ece1c7a7362127dd15c8b15132564c4bc87b334 Mon Sep 17 00:00:00 2001 From: Laurent Christophe Date: Fri, 10 Mar 2023 20:02:51 +0100 Subject: [PATCH] build: dog food --- .gitignore | 3 ++ appmap.yml | 96 +++++++++++++++++++++++++++++++++ package.json | 6 ++- yarn.lock | 150 ++++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 247 insertions(+), 8 deletions(-) create mode 100644 appmap.yml diff --git a/.gitignore b/.gitignore index ff05a8d56b..34efa9bddc 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ pnpm-debug.log* .pnp.* release + +# Dog Food +*.appmap.json diff --git a/appmap.yml b/appmap.yml new file mode 100644 index 0000000000..7b0eef0d4a --- /dev/null +++ b/appmap.yml @@ -0,0 +1,96 @@ +log: + level: info +# Do not use node async_hooks to order callbacks. +# This has a big performance hit. +ordering: chronological +# Only use safe serialization methods. +# For instance `object.toString()` can trigger arbritary code. +# In particular, it can cause infinite recursion. +serialization: + impure-printing: false + impure-constructor-naming: false + impure-array-inspection: false + impure-error-inspection: false + impure-hash-inspection: false +# Exclude anonymous functions everywhere +exclude: + - \[anonymous\] +packages: + # Exclude package files + - regexp: (^|/)node_modules/ + enabled: false + # Exclude external files + - regexp: ^../ + enabled: false + # Include the rest by default + - regexp: ^ + enabled: true +# By default run all scenarios. +# To run only one scenario: +# yarn exec appmap-agent-js --scenario jest-models +scenario: ^ +scenarios: + cli: + appmap_dir: packages/cli/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/cli + # TODO + # client: + # appmap_dir: packages/client/tmp + # command: yarn exec jest --no-cache + # command-options: + # cwd: packages/client + # components: Let's not map components atm because it uses cypress + diagrams: + appmap_dir: packages/diagrams/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/diagrams + env: + NODE_OPTIONS: --experimental-vm-modules + models: + appmap_dir: packages/models/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/models + # These methods are recorded too many times during testing. + # They cause memory overflow on my machine. + packages: + - path: packages/models/src/util.js + enabled: true + exclude: + - isEmpty + - addHiddenProperty + - path: packages/models/src/event.js + enabled: true + exclude: + - isCall + - isReturn + - callEvent + - returnEvent + openapi: + appmap_dir: packages/openapi/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/openapi + scanner: + appmap_dir: packages/scanner/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/scanner + sequence-diagram: + appmap_dir: packages/sequence-diagram/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/sequence-diagram + telemetry: + appmap_dir: packages/telemetry/tmp + command: yarn exec jest --no-cache + command-options: + cwd: packages/telemetry + validate: + appmap_dir: packages/validate/tmp + command: node test/smoke.js + command-options: + cwd: packages/validate diff --git a/package.json b/package.json index d394cca9a2..2097ff78a1 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "packages/*" ], "scripts": { + "appmap": "yarn exec appmap-agent-js", "lint": "yarn workspaces foreach --exclude root -v run lint", "test": "yarn workspaces foreach --exclude '{root}' -v run test", "build": "yarn workspaces foreach -t --exclude root -v run build", @@ -44,5 +45,8 @@ "semantic-release-monorepo": "^7.0.5", "yarn-changed-workspaces": "^2.0.9" }, - "packageManager": "yarn@3.2.1" + "packageManager": "yarn@3.2.1", + "dependencies": { + "@appland/appmap-agent-js": "https://github.com/getappmap/appmap-agent-js#8b8a70c08466f08e243e0524588d5da0daf43480" + } } diff --git a/yarn.lock b/yarn.lock index e910ae6d58..4c91e9e3c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,7 +56,40 @@ __metadata: languageName: node linkType: hard -"@appland/appmap-validate@workspace:packages/validate": +"@appland/appmap-agent-js@https://github.com/getappmap/appmap-agent-js#8b8a70c08466f08e243e0524588d5da0daf43480": + version: 13.5.0 + resolution: "@appland/appmap-agent-js@https://github.com/getappmap/appmap-agent-js.git#commit=8b8a70c08466f08e243e0524588d5da0daf43480" + dependencies: + "@appland/appmap-validate": ^2.3.0 + "@babel/parser": ^7.15.8 + ajv: ^8.6.3 + ajv-error-tree: 0.0.5 + astring: ^1.8.4 + chalk: ^5.0.1 + glob: ^8.0.3 + klaw-sync: ^6.0.0 + minimatch: ^5.1.0 + minimist: ^1.2.7 + net-socket-messaging: ^0.1.6 + posix-socket: ^1.1.3 + posix-socket-messaging: 0.0.1 + prompts: ^2.4.2 + semver: ^7.3.5 + treeify: ^1.1.0 + vlq: ^2.0.4 + yaml: ^2.1.1 + dependenciesMeta: + posix-socket: + optional: true + posix-socket-messaging: + optional: true + bin: + appmap-agent-js: bin/appmap-agent-js.cjs + checksum: f557c8cfe5decde9c6c12400563b0a62b00477ff2c09aa4699ab92fc4e122133c1b9cee232bba02877e477f26030b659c8d0faed315d03cce7f7b1fafc2338b0 + languageName: node + linkType: hard + +"@appland/appmap-validate@^2.3.0, @appland/appmap-validate@workspace:packages/validate": version: 0.0.0-use.local resolution: "@appland/appmap-validate@workspace:packages/validate" dependencies: @@ -1121,6 +1154,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.15.8": + version: 7.20.15 + resolution: "@babel/parser@npm:7.20.15" + bin: + parser: ./bin/babel-parser.js + checksum: 1d0f47ca67ff2652f1c0ff1570bed8deccbc4b53509e7cd73476af9cc7ed23480c99f1179bd6d0be01612368b92b39e206d330ad6054009d699934848a89298b + languageName: node + linkType: hard + "@babel/parser@npm:^7.18.10, @babel/parser@npm:^7.20.5": version: 7.20.5 resolution: "@babel/parser@npm:7.20.5" @@ -7958,7 +8000,7 @@ __metadata: languageName: node linkType: hard -"ajv-error-tree@npm:^0.0.5": +"ajv-error-tree@npm:0.0.5, ajv-error-tree@npm:^0.0.5": version: 0.0.5 resolution: "ajv-error-tree@npm:0.0.5" checksum: b54060ab7dd075b6c5b86de899d39970fa714ece2f5918a1353d9f16bfd514618b01cb89281185ba98097b079764e25042b7e89cd8da4c18ab392207e19c7a61 @@ -8605,6 +8647,15 @@ __metadata: languageName: node linkType: hard +"astring@npm:^1.8.4": + version: 1.8.4 + resolution: "astring@npm:1.8.4" + bin: + astring: bin/astring + checksum: bc0b98087350c4a0c8a510d491d648cf8b299ec904629d5e0f5ae8d2ccc515cd27475327bb9729c7e92f4a4873adcd05cef15379d0f6f7293f1320319f0d24f0 + languageName: node + linkType: hard + "async-each@npm:^1.0.0, async-each@npm:^1.0.1": version: 1.0.3 resolution: "async-each@npm:1.0.3" @@ -10063,9 +10114,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001286": - version: 1.0.30001312 - resolution: "caniuse-lite@npm:1.0.30001312" - checksum: 753fb9ea1e02e999430b323a71b5acab5120f3b5fc0161b01669f54a3ef5c5296240b6ae9b79b12a3742e3aed216aa9ee3d5398a23c16d08625ccd376b79545d + version: 1.0.30001464 + resolution: "caniuse-lite@npm:1.0.30001464" + checksum: 67cdee102c1660d62d7b9dbd4740bb7af096236618f2509fd2e0039d50db5f02fb87c21d90b6d573fdcf50deaf3c84503d009e871502b5c221d0ba1dec18ba11 languageName: node linkType: hard @@ -10169,6 +10220,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^5.0.1": + version: 5.2.0 + resolution: "chalk@npm:5.2.0" + checksum: 03d8060277de6cf2fd567dc25fcf770593eb5bb85f460ce443e49255a30ff1242edd0c90a06a03803b0466ff0687a939b41db1757bec987113e83de89a003caa + languageName: node + linkType: hard + "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -15533,6 +15591,19 @@ __metadata: languageName: node linkType: hard +"glob@npm:^8.0.3": + version: 8.1.0 + resolution: "glob@npm:8.1.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^5.0.1 + once: ^1.3.0 + checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 + languageName: node + linkType: hard + "global-dirs@npm:^3.0.0": version: 3.0.0 resolution: "global-dirs@npm:3.0.0" @@ -19657,6 +19728,15 @@ __metadata: languageName: node linkType: hard +"klaw-sync@npm:^6.0.0": + version: 6.0.0 + resolution: "klaw-sync@npm:6.0.0" + dependencies: + graceful-fs: ^4.1.11 + checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475 + languageName: node + linkType: hard + "klaw@npm:^1.0.0": version: 1.3.1 resolution: "klaw@npm:1.3.1" @@ -21261,6 +21341,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^5.1.0": + version: 5.1.6 + resolution: "minimatch@npm:5.1.6" + dependencies: + brace-expansion: ^2.0.1 + checksum: 7564208ef81d7065a370f788d337cd80a689e981042cb9a1d0e6580b6c6a8c9279eba80010516e258835a988363f99f54a6f711a315089b8b42694f5da9d0d77 + languageName: node + linkType: hard + "minimatch@npm:^5.1.2": version: 5.1.2 resolution: "minimatch@npm:5.1.2" @@ -21302,6 +21391,13 @@ __metadata: languageName: node linkType: hard +"minimist@npm:^1.2.7": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 + languageName: node + linkType: hard + "minipass-collect@npm:^1.0.2": version: 1.0.2 resolution: "minipass-collect@npm:1.0.2" @@ -21675,6 +21771,13 @@ __metadata: languageName: node linkType: hard +"net-socket-messaging@npm:^0.1.6": + version: 0.1.6 + resolution: "net-socket-messaging@npm:0.1.6" + checksum: de185dfe32c25750874fbc1e4ed5dfcfb12d8fa80f27dd167b84a0ed2bb9acc75f0d7433e9c2c7dad1c2659f6c43632a510b1aef381dc3e4f7e5defeb41d946b + languageName: node + linkType: hard + "netstats@npm:0.0.6": version: 0.0.6 resolution: "netstats@npm:0.0.6" @@ -21833,7 +21936,7 @@ __metadata: languageName: node linkType: hard -"node-gyp@npm:*, node-gyp@npm:^8.2.0, node-gyp@npm:^8.3.0, node-gyp@npm:latest": +"node-gyp@npm:*, node-gyp@npm:^8.2.0, node-gyp@npm:^8.3.0, node-gyp@npm:^8.4.0, node-gyp@npm:latest": version: 8.4.1 resolution: "node-gyp@npm:8.4.1" dependencies: @@ -23873,6 +23976,24 @@ __metadata: languageName: node linkType: hard +"posix-socket-messaging@npm:0.0.1": + version: 0.0.1 + resolution: "posix-socket-messaging@npm:0.0.1" + dependencies: + posix-socket: ^1.0.1 + checksum: d6877cf8c1dbd8e55b69352e795b1944a3a7325b21465a15334bb142a61863da8fa07c3ea39cdd04fb27b9bdf861589ac63ab97a16efc436475babdd54f4d8a1 + languageName: node + linkType: hard + +"posix-socket@npm:^1.0.1, posix-socket@npm:^1.1.3": + version: 1.1.4 + resolution: "posix-socket@npm:1.1.4" + dependencies: + node-gyp: ^8.4.0 + conditions: (os=linux | os=darwin) + languageName: node + linkType: hard + "postcss-calc@npm:^7.0.1": version: 7.0.5 resolution: "postcss-calc@npm:7.0.5" @@ -24749,7 +24870,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.0": +"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -26241,6 +26362,7 @@ resolve@1.1.7: version: 0.0.0-use.local resolution: "root@workspace:." dependencies: + "@appland/appmap-agent-js": "https://github.com/getappmap/appmap-agent-js#8b8a70c08466f08e243e0524588d5da0daf43480" "@google/semantic-release-replace-plugin": ^1.0.2 "@semantic-release/changelog": ^5.0.1 "@semantic-release/commit-analyzer": ^8.0.1 @@ -29967,6 +30089,13 @@ typescript@~4.4.3: languageName: node linkType: hard +"vlq@npm:^2.0.4": + version: 2.0.4 + resolution: "vlq@npm:2.0.4" + checksum: b2ed0d3a5423f34bba98a18250f8b13a96eebff9c8f9427fa9cd78065d31f35641f6fd659c5642253b79532000a37aec0582abac95d1ef4af2cd0c96a716f1b6 + languageName: node + linkType: hard + "vm-browserify@npm:^1.0.1": version: 1.1.2 resolution: "vm-browserify@npm:1.1.2" @@ -31068,6 +31197,13 @@ typescript@~4.4.3: languageName: node linkType: hard +"yaml@npm:^2.1.1": + version: 2.2.1 + resolution: "yaml@npm:2.2.1" + checksum: 84f68cbe462d5da4e7ded4a8bded949ffa912bc264472e5a684c3d45b22d8f73a3019963a32164023bdf3d83cfb6f5b58ff7b2b10ef5b717c630f40bd6369a23 + languageName: node + linkType: hard + "yargs-parser@npm:10.x": version: 10.1.0 resolution: "yargs-parser@npm:10.1.0"