trace-anything 1.0.1 → 1.0.2
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.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
branches:
|
|
4
|
+
- main
|
|
5
|
+
|
|
6
|
+
name: release-please
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release-please:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
# Create/update release PR
|
|
13
|
+
- uses: google-github-actions/release-please-action@v3
|
|
14
|
+
id: release
|
|
15
|
+
with:
|
|
16
|
+
release-type: node
|
|
17
|
+
|
|
18
|
+
# The logic below handles npm publication. Each step is conditional on a
|
|
19
|
+
# release having been created by someone merging the release PR.
|
|
20
|
+
- uses: actions/checkout@v2
|
|
21
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
22
|
+
- uses: actions/setup-node@v1
|
|
23
|
+
with:
|
|
24
|
+
node-version: 12
|
|
25
|
+
registry-url: 'https://registry.npmjs.org'
|
|
26
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
27
|
+
- run: npm ci
|
|
28
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
29
|
+
- run: npm publish
|
|
30
|
+
env:
|
|
31
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
32
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
33
|
+
- run: npm pack
|
|
34
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
35
|
+
- uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2
|
|
36
|
+
with:
|
|
37
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
tag: ${{ steps.release.outputs.tag_name }}
|
|
39
|
+
file: trace-anything-*.tgz
|
|
40
|
+
file_glob: true
|
|
41
|
+
overwrite: true
|
|
42
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Install this in .github/workflows/ to automate label updates
|
|
2
|
+
name: Sync Labels
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
# Allows for manual triggering.
|
|
7
|
+
inputs:
|
|
8
|
+
dry_run:
|
|
9
|
+
description: "If true, don't make any actual changes"
|
|
10
|
+
required: false
|
|
11
|
+
default: false
|
|
12
|
+
schedule:
|
|
13
|
+
# Run every week on Sunday at 5:42 AM.
|
|
14
|
+
- cron: '42 5 * * 0'
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
sync-labels:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout code
|
|
21
|
+
uses: actions/checkout@v2
|
|
22
|
+
with:
|
|
23
|
+
repository: shaka-project/shaka-github-tools
|
|
24
|
+
|
|
25
|
+
# TODO: revert to micnncim and new release after landing
|
|
26
|
+
# https://github.com/micnncim/action-label-syncer/pull/68
|
|
27
|
+
- uses: joeyparrish/action-label-syncer@v1.8.0
|
|
28
|
+
with:
|
|
29
|
+
dry_run: ${{ github.event.inputs.dry_run || false }}
|
|
30
|
+
prune: true
|
|
31
|
+
manifest: sync-labels/configs/${{ github.repository }}.yaml
|
|
32
|
+
repository: ${{ github.repository }}
|
|
33
|
+
token: ${{ github.token }}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Install this in .github/workflows/ to automate issue maintenance.
|
|
2
|
+
name: Update Issues
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
# Allows for manual triggering.
|
|
7
|
+
schedule:
|
|
8
|
+
# Run every 30 minutes
|
|
9
|
+
- cron: '*/30 * * * *'
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
issues: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
update-issues:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v2
|
|
20
|
+
with:
|
|
21
|
+
repository: shaka-project/shaka-github-tools
|
|
22
|
+
|
|
23
|
+
- name: Update Issues
|
|
24
|
+
env:
|
|
25
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
run: |
|
|
27
|
+
cd update-issues
|
|
28
|
+
npm ci
|
|
29
|
+
node main.js
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Validate PR Title
|
|
2
|
+
|
|
3
|
+
# We recommend that maintainers use this Chrome/Firefox extension so that
|
|
4
|
+
# squashed PRs will have the merged commit message default to the PR title and
|
|
5
|
+
# description: https://github.com/zachwhaley/squashed-merge-message
|
|
6
|
+
#
|
|
7
|
+
# This avoids the need to amend commits after the fact to match the desired PR
|
|
8
|
+
# syntax. As long as the PR itself is properly-formatted, this extension will
|
|
9
|
+
# help you commit the right format to the repo, too. This, in turn, feeds the
|
|
10
|
+
# changelog and release workflows.
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
# NOTE: The automated PRs from release-please-action do not seem to trigger
|
|
14
|
+
# any of the default PR triggers (opened, synchronize, reopened). So we need
|
|
15
|
+
# additional types. This is a good set that makes it easy to trigger the
|
|
16
|
+
# workflow manually if needed.
|
|
17
|
+
pull_request_target:
|
|
18
|
+
types:
|
|
19
|
+
- opened
|
|
20
|
+
- reopened
|
|
21
|
+
- edited
|
|
22
|
+
- synchronize
|
|
23
|
+
- assigned
|
|
24
|
+
- labeled
|
|
25
|
+
- ready_for_review
|
|
26
|
+
- review_requested
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
main:
|
|
30
|
+
name: Validate PR Title
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: amannn/action-semantic-pull-request@v4
|
|
34
|
+
env:
|
|
35
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.2](https://github.com/shaka-project/trace-anything/compare/v1.0.1...v1.0.2) (2022-06-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* missing parameter `options` in `_shimPropertySilent()` ([#10](https://github.com/shaka-project/trace-anything/issues/10)) ([b7fa653](https://github.com/shaka-project/trace-anything/commit/b7fa653d5f1eb7aa234354ac98cac8ef9a335871))
|
|
9
|
+
|
|
10
|
+
## [1.0.1](https://github.com/shaka-project/trace-anything/compare/v1.0.1...v1.0.0) (2021-11-15)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* Fix window pollution in browser, closes [shaka-project/eme_logger#25](https://github.com/shaka-project/eme_logger/issues/25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.0](https://github.com/shaka-project/trace-anything/commit/a37901024826f4600c5998d4da16099016b8aa18) (2021-11-10)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* Initial independent release. Split out from shaka-project/eme_logger. ([a379010](https://github.com/shaka-project/trace-anything/commit/a37901024826f4600c5998d4da16099016b8aa18))
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trace-anything",
|
|
3
3
|
"description": "Shim and trace calls to absolutely anything",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"homepage": "https://github.com/
|
|
4
|
+
"version": "1.0.2",
|
|
5
|
+
"homepage": "https://github.com/shaka-project/trace-anything",
|
|
6
6
|
"author": "Joey Parrish",
|
|
7
7
|
"maintainers": [
|
|
8
8
|
{
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"main": "trace-anything.js",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/shaka-project/trace-anything.git"
|
|
17
17
|
},
|
|
18
18
|
"bugs": {
|
|
19
|
-
"url": "https://github.com/
|
|
19
|
+
"url": "https://github.com/shaka-project/trace-anything/issues"
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0"
|
|
22
22
|
}
|
package/trace-anything.js
CHANGED
|
@@ -311,7 +311,7 @@ class TraceAnything {
|
|
|
311
311
|
if (options.methods) {
|
|
312
312
|
TraceAnything._shimMethod(traced, object, k, className, options);
|
|
313
313
|
} else {
|
|
314
|
-
TraceAnything._shimPropertySilent(traced, object, k);
|
|
314
|
+
TraceAnything._shimPropertySilent(traced, object, k, options);
|
|
315
315
|
}
|
|
316
316
|
} else if (options.properties && options.treatPromisePropertiesAsEvents &&
|
|
317
317
|
object[k] && object[k].then) {
|
|
@@ -320,7 +320,7 @@ class TraceAnything {
|
|
|
320
320
|
if (options.properties) {
|
|
321
321
|
TraceAnything._shimProperty(traced, object, k, className, options);
|
|
322
322
|
} else {
|
|
323
|
-
TraceAnything._shimPropertySilent(traced, object, k);
|
|
323
|
+
TraceAnything._shimPropertySilent(traced, object, k, options);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
@@ -618,9 +618,10 @@ class TraceAnything {
|
|
|
618
618
|
* @param {!Object} traced The traced object.
|
|
619
619
|
* @param {!Object} object The original object.
|
|
620
620
|
* @param {string} k The member name.
|
|
621
|
+
* @param {TraceAnything.Options} options
|
|
621
622
|
* @private
|
|
622
623
|
*/
|
|
623
|
-
static _shimPropertySilent(traced, object, k) {
|
|
624
|
+
static _shimPropertySilent(traced, object, k, options) {
|
|
624
625
|
if (options.inPlace) {
|
|
625
626
|
// If we're shimming the object in-place, we don't need a "silent" shim.
|
|
626
627
|
// That is only needed for constructing a new traced object to take the
|