diff --git a/.changeset/lovely-apples-cough.md b/.changeset/lovely-apples-cough.md new file mode 100644 index 00000000..98427003 --- /dev/null +++ b/.changeset/lovely-apples-cough.md @@ -0,0 +1,7 @@ +--- +"checksync": major +--- + +- The location of the configuration file is now used as the current working directory, if a configuration file is used. This means that globs are resolved relative to the configuration file, not the current working directory of the process launching checksync, which makes for a more deterministic behavior for +folks trying to define and use their config files. +- A `--cwd` argument has been added for specifying the working directory in cases where a configuration file is not used, or the configuration file discover needs to start in a place other than where checksync is invoked. If a configuration file is loaded, the location of that file takes precedence. diff --git a/.codecov.yml b/.codecov.yml index ac989bef..71b10962 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -5,7 +5,7 @@ coverage: status: project: - default: on + default: true patch: default: off changes: @@ -14,6 +14,6 @@ coverage: comment: layout: "header, reach, diff, flags, files, footer" behavior: default - require_changes: no - require_base: no - require_head: yes + require_changes: false + require_base: false + require_head: true diff --git a/src/__tests__/__snapshots__/cli.test.ts.snap b/src/__tests__/__snapshots__/cli.test.ts.snap index 839e2238..24e8723c 100644 --- a/src/__tests__/__snapshots__/cli.test.ts.snap +++ b/src/__tests__/__snapshots__/cli.test.ts.snap @@ -66,6 +66,21 @@ Where: .checksyncrc .checksyncrc.json + Paths within the config file are resolved relative to + the location of the config file. + + --cwd The current working directory to use when searching + for a configuration file, and resolving relative paths + and globs. + + The --config path takes precedence over this + argument. If there is no --config argument, this + location is used to find a config file. If a config file + is found, the working directory will then change to + the location of that file, otherwise this argument's + value is used when resolve the remainder of the given + arguments. + --dry-run,-n Ignored unless supplied with --update-tags. --help,-h Outputs this help text. diff --git a/src/__tests__/__snapshots__/integration.test.ts.snap b/src/__tests__/__snapshots__/integration.test.ts.snap index 133c2f0b..8b2bb5c1 100644 --- a/src/__tests__/__snapshots__/integration.test.ts.snap +++ b/src/__tests__/__snapshots__/integration.test.ts.snap @@ -1,22 +1,23 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Integration Tests (see __examples__ folder) should report example checksums_need_updating to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["checksums_need_updating/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/checksums_need_updating/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "checksums_need_updating/**" + "**/checksums_need_updating/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -26,43 +27,44 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/checksums_need_updating/b.py", "ROOT_DIR/__examples__/checksums_need_updating/c.jsx" ] -Mismatch checksums_need_updating/a.js:4 -Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/b.py:3' +Mismatch __examples__/checksums_need_updating/a.js:4 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/b.py:3' Make sure you've made the parallel changes in the source file, if necessary (45678 != 249234014) -Mismatch checksums_need_updating/a.js:5 -Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/c.jsx:3' +Mismatch __examples__/checksums_need_updating/a.js:5 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/c.jsx:3' Make sure you've made the parallel changes in the source file, if necessary (1234 != 1992689801) -Mismatch checksums_need_updating/b.py:3 -Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/a.js:4' +Mismatch __examples__/checksums_need_updating/b.py:3 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/a.js:4' Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083) -Mismatch checksums_need_updating/c.jsx:3 -Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/a.js:5' +Mismatch __examples__/checksums_need_updating/c.jsx:3 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/a.js:5' Make sure you've made the parallel changes in the source file, if necessary (123 != 2050223083) - checksync -u checksums_need_updating/a.js checksums_need_updating/b.py checksums_need_updating/c.jsx + checksync -u __examples__/checksums_need_updating/a.js __examples__/checksums_need_updating/b.py __examples__/checksums_need_updating/c.jsx " `; exports[`Integration Tests (see __examples__ folder) should report example checksums_need_updating to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["checksums_need_updating/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/checksums_need_updating/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "checksums_need_updating/**" + "**/checksums_need_updating/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -72,45 +74,46 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/checksums_need_updating/b.py", "ROOT_DIR/__examples__/checksums_need_updating/c.jsx" ] -Verbose checksums_need_updating/a.js +Verbose __examples__/checksums_need_updating/a.js File has errors; skipping auto-fix -Fix checksums_need_updating/a.js:4 -Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/b.py:3' from 45678 to 249234014. -Fix checksums_need_updating/a.js:5 -Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/c.jsx:3' from 1234 to 1992689801. -Verbose checksums_need_updating/b.py +Fix __examples__/checksums_need_updating/a.js:4 +Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/b.py:3' from 45678 to 249234014. +Fix __examples__/checksums_need_updating/a.js:5 +Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/c.jsx:3' from 1234 to 1992689801. +Verbose __examples__/checksums_need_updating/b.py File has errors; skipping auto-fix -Fix checksums_need_updating/b.py:3 -Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/a.js:4' from 4567 to 2050223083. -Verbose checksums_need_updating/c.jsx +Fix __examples__/checksums_need_updating/b.py:3 +Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/a.js:4' from 4567 to 2050223083. +Verbose __examples__/checksums_need_updating/c.jsx File has errors; skipping auto-fix -Fix checksums_need_updating/c.jsx:3 -Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/a.js:5' from 123 to 2050223083. +Fix __examples__/checksums_need_updating/c.jsx:3 +Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/a.js:5' from 123 to 2050223083. - checksync -u checksums_need_updating/a.js checksums_need_updating/b.py checksums_need_updating/c.jsx + checksync -u __examples__/checksums_need_updating/a.js __examples__/checksums_need_updating/b.py __examples__/checksums_need_updating/c.jsx 🎉 Everything is in sync!" `; exports[`Integration Tests (see __examples__ folder) should report example checksums_need_updating to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["checksums_need_updating/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/checksums_need_updating/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/checksums_need_updating/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "checksums_need_updating/**" + "**/checksums_need_updating/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -122,12 +125,12 @@ Verbose Discovered paths: [ ] { "version": "0.0.0", - "launchString": "checksync -u checksums_need_updating/a.js checksums_need_updating/b.py checksums_need_updating/c.jsx", + "launchString": "checksync -u __examples__/checksums_need_updating/a.js __examples__/checksums_need_updating/b.py __examples__/checksums_need_updating/c.jsx", "files": { "__examples__/checksums_need_updating/a.js": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (45678 != 249234014)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (45678 != 249234014)", "location": { "line": 3 }, @@ -136,12 +139,12 @@ Verbose Discovered paths: [ "line": 4, "text": " // sync-start:update_me 249234014 __examples__/checksums_need_updating/b.py", "declaration": " // sync-start:update_me 45678 __examples__/checksums_need_updating/b.py", - "description": "Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/b.py:3' from 45678 to 249234014." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/b.py:3' from 45678 to 249234014." } }, { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/c.jsx:3'. Make sure you've made the parallel changes in the source file, if necessary (1234 != 1992689801)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/c.jsx:3'. Make sure you've made the parallel changes in the source file, if necessary (1234 != 1992689801)", "location": { "line": 3 }, @@ -150,14 +153,14 @@ Verbose Discovered paths: [ "line": 5, "text": " // sync-start:update_me 1992689801 __examples__/checksums_need_updating/c.jsx", "declaration": " // sync-start:update_me 1234 __examples__/checksums_need_updating/c.jsx", - "description": "Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/c.jsx:3' from 1234 to 1992689801." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/c.jsx:3' from 1234 to 1992689801." } } ], "__examples__/checksums_need_updating/b.py": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/a.js:4'. Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/a.js:4'. Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083)", "location": { "line": 4 }, @@ -166,14 +169,14 @@ Verbose Discovered paths: [ "line": 3, "text": "# sync-start:update_me 2050223083 __examples__/checksums_need_updating/a.js", "declaration": "# sync-start:update_me 4567 __examples__/checksums_need_updating/a.js", - "description": "Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/a.js:4' from 4567 to 2050223083." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/a.js:4' from 4567 to 2050223083." } } ], "__examples__/checksums_need_updating/c.jsx": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'checksums_need_updating/a.js:5'. Make sure you've made the parallel changes in the source file, if necessary (123 != 2050223083)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/checksums_need_updating/a.js:5'. Make sure you've made the parallel changes in the source file, if necessary (123 != 2050223083)", "location": { "line": 5 }, @@ -182,7 +185,7 @@ Verbose Discovered paths: [ "line": 3, "text": " {/* sync-start:update_me 2050223083 __examples__/checksums_need_updating/a.js */}", "declaration": " {/* sync-start:update_me 123 __examples__/checksums_need_updating/a.js */}", - "description": "Updated checksum for sync-tag 'update_me' referencing 'checksums_need_updating/a.js:5' from 123 to 2050223083." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/checksums_need_updating/a.js:5' from 123 to 2050223083." } } ] @@ -191,22 +194,23 @@ Verbose Discovered paths: [ `; exports[`Integration Tests (see __examples__ folder) should report example content_after_start to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["content_after_start/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/content_after_start/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "content_after_start/**" + "**/content_after_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -216,51 +220,52 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/content_after_start/b.py", "ROOT_DIR/__examples__/content_after_start/c.js" ] -Mismatch content_after_start/a.js:3 -Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/b.py:3' +Mismatch __examples__/content_after_start/a.js:3 +Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/b.py:3' Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014) -Mismatch content_after_start/b.py:3 -Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/a.js:3' +Mismatch __examples__/content_after_start/b.py:3 +Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/a.js:3' Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101) -Mismatch content_after_start/b.py:4 -Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/c.js:3' +Mismatch __examples__/content_after_start/b.py:4 +Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/c.js:3' Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101) -Error content_after_start/c.js:5 +Error __examples__/content_after_start/c.js:5 Sync-start for 'content_after_start' found after content started -Mismatch content_after_start/c.js:3 -Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/b.py:4' +Mismatch __examples__/content_after_start/c.js:3 +Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/b.py:4' Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014) -Error content_after_start/c.js:5 -No return tag named 'content_after_start' in 'content_after_start/a.js' +Error __examples__/content_after_start/c.js:5 +No return tag named 'content_after_start' in '__examples__/content_after_start/a.js' - checksync -u content_after_start/a.js content_after_start/b.py content_after_start/c.js + checksync -u __examples__/content_after_start/a.js __examples__/content_after_start/b.py __examples__/content_after_start/c.js - content_after_start/c.js + __examples__/content_after_start/c.js " `; exports[`Integration Tests (see __examples__ folder) should report example content_after_start to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["content_after_start/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/content_after_start/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "content_after_start/**" + "**/content_after_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -270,48 +275,49 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/content_after_start/b.py", "ROOT_DIR/__examples__/content_after_start/c.js" ] -Verbose content_after_start/a.js +Verbose __examples__/content_after_start/a.js File has errors; skipping auto-fix -Fix content_after_start/a.js:3 -Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/b.py:3' from no checksum to 249234014. -Verbose content_after_start/b.py +Fix __examples__/content_after_start/a.js:3 +Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/b.py:3' from no checksum to 249234014. +Verbose __examples__/content_after_start/b.py File has errors; skipping auto-fix -Fix content_after_start/b.py:3 -Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/a.js:3' from no checksum to 770446101. -Fix content_after_start/b.py:4 -Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/c.js:3' from no checksum to 770446101. -Error content_after_start/c.js:5 +Fix __examples__/content_after_start/b.py:3 +Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/a.js:3' from no checksum to 770446101. +Fix __examples__/content_after_start/b.py:4 +Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/c.js:3' from no checksum to 770446101. +Error __examples__/content_after_start/c.js:5 Sync-start for 'content_after_start' found after content started -Error content_after_start/c.js:5 -No return tag named 'content_after_start' in 'content_after_start/a.js' +Error __examples__/content_after_start/c.js:5 +No return tag named 'content_after_start' in '__examples__/content_after_start/a.js' - checksync -u content_after_start/a.js content_after_start/b.py content_after_start/c.js + checksync -u __examples__/content_after_start/a.js __examples__/content_after_start/b.py __examples__/content_after_start/c.js - content_after_start/c.js + __examples__/content_after_start/c.js " `; exports[`Integration Tests (see __examples__ folder) should report example content_after_start to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["content_after_start/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/content_after_start/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/content_after_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "content_after_start/**" + "**/content_after_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -324,12 +330,12 @@ Verbose Discovered paths: [ Error 🛑 Unfixable errors found. Fix the errors and try again. { "version": "0.0.0", - "launchString": "checksync -u content_after_start/a.js content_after_start/b.py content_after_start/c.js", + "launchString": "checksync -u __examples__/content_after_start/a.js __examples__/content_after_start/b.py __examples__/content_after_start/c.js", "files": { "__examples__/content_after_start/a.js": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014)", + "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014)", "location": { "line": 3 }, @@ -338,14 +344,14 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. "line": 3, "text": "// sync-start:content_after_start 249234014 __examples__/content_after_start/b.py", "declaration": "// sync-start:content_after_start __examples__/content_after_start/b.py", - "description": "Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/b.py:3' from no checksum to 249234014." + "description": "Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/b.py:3' from no checksum to 249234014." } } ], "__examples__/content_after_start/b.py": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/a.js:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101)", + "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/a.js:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101)", "location": { "line": 3 }, @@ -354,12 +360,12 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. "line": 3, "text": "# sync-start:content_after_start 770446101 __examples__/content_after_start/a.js", "declaration": "# sync-start:content_after_start __examples__/content_after_start/a.js", - "description": "Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/a.js:3' from no checksum to 770446101." + "description": "Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/a.js:3' from no checksum to 770446101." } }, { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/c.js:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101)", + "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/c.js:3'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 770446101)", "location": { "line": 3 }, @@ -368,7 +374,7 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. "line": 4, "text": "# sync-start:content_after_start 770446101 __examples__/content_after_start/c.js", "declaration": "# sync-start:content_after_start __examples__/content_after_start/c.js", - "description": "Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/c.js:3' from no checksum to 770446101." + "description": "Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/c.js:3' from no checksum to 770446101." } } ], @@ -382,7 +388,7 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. }, { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in 'content_after_start/b.py:4'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014)", + "reason": "Looks like you changed the target content for sync-tag 'content_after_start' in '__examples__/content_after_start/b.py:4'. Make sure you've made the parallel changes in the source file, if necessary (No checksum != 249234014)", "location": { "line": 4 }, @@ -391,11 +397,11 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. "line": 3, "text": "// sync-start:content_after_start 249234014 __examples__/content_after_start/b.py", "declaration": "// sync-start:content_after_start __examples__/content_after_start/b.py", - "description": "Updated checksum for sync-tag 'content_after_start' referencing 'content_after_start/b.py:4' from no checksum to 249234014." + "description": "Updated checksum for sync-tag 'content_after_start' referencing '__examples__/content_after_start/b.py:4' from no checksum to 249234014." } }, { - "reason": "No return tag named 'content_after_start' in 'content_after_start/a.js'", + "reason": "No return tag named 'content_after_start' in '__examples__/content_after_start/a.js'", "code": "no-return-tag", "location": { "line": 5 @@ -407,22 +413,23 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. `; exports[`Integration Tests (see __examples__ folder) should report example correct_checksums to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["correct_checksums/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/correct_checksums/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "correct_checksums/**" + "**/correct_checksums/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -436,23 +443,24 @@ Verbose Discovered paths: [ `; exports[`Integration Tests (see __examples__ folder) should report example correct_checksums to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["correct_checksums/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/correct_checksums/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "correct_checksums/**" + "**/correct_checksums/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -466,22 +474,23 @@ Verbose Discovered paths: [ `; exports[`Integration Tests (see __examples__ folder) should report example correct_checksums to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["correct_checksums/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/correct_checksums/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/correct_checksums/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "correct_checksums/**" + "**/correct_checksums/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -499,22 +508,23 @@ Verbose Discovered paths: [ `; exports[`Integration Tests (see __examples__ folder) should report example directory_target to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["directory_target/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/directory_target/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "directory_target/**" + "**/directory_target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -523,34 +533,35 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/directory_target/a_directory/somefile.js", "ROOT_DIR/__examples__/directory_target/example.js" ] -Error directory_target/example.js:3 +Error __examples__/directory_target/example.js:3 Sync-start for 'directory_target' points to '__examples__/directory_target/a_directory', which does not exist or is a directory -Error directory_target/example.js:3 -No return tag named 'directory_target' in 'directory_target/a_directory' +Error __examples__/directory_target/example.js:3 +No return tag named 'directory_target' in '__examples__/directory_target/a_directory' - directory_target/example.js + __examples__/directory_target/example.js " `; exports[`Integration Tests (see __examples__ folder) should report example directory_target to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["directory_target/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/directory_target/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "directory_target/**" + "**/directory_target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -559,33 +570,34 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/directory_target/a_directory/somefile.js", "ROOT_DIR/__examples__/directory_target/example.js" ] -Error directory_target/example.js:3 +Error __examples__/directory_target/example.js:3 Sync-start for 'directory_target' points to '__examples__/directory_target/a_directory', which does not exist or is a directory -Error directory_target/example.js:3 -No return tag named 'directory_target' in 'directory_target/a_directory' +Error __examples__/directory_target/example.js:3 +No return tag named 'directory_target' in '__examples__/directory_target/a_directory' - directory_target/example.js + __examples__/directory_target/example.js " `; exports[`Integration Tests (see __examples__ folder) should report example directory_target to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["directory_target/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/directory_target/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/directory_target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "directory_target/**" + "**/directory_target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -608,7 +620,7 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. "code": "file-does-not-exist" }, { - "reason": "No return tag named 'directory_target' in 'directory_target/a_directory'", + "reason": "No return tag named 'directory_target' in '__examples__/directory_target/a_directory'", "code": "no-return-tag", "location": { "line": 3 @@ -620,22 +632,23 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. `; exports[`Integration Tests (see __examples__ folder) should report example duplicate-target to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["duplicate-target/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/duplicate-target/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "duplicate-target/**" + "**/duplicate-target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -644,42 +657,43 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/duplicate-target/a.js", "ROOT_DIR/__examples__/duplicate-target/b.py" ] -Warning duplicate-target/a.js:5 +Warning __examples__/duplicate-target/a.js:5 Duplicate target for sync-tag 'update_me' -Mismatch duplicate-target/a.js:4 -Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/b.py:3' +Mismatch __examples__/duplicate-target/a.js:4 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/b.py:3' Make sure you've made the parallel changes in the source file, if necessary (12352 != 249234014) -Mismatch duplicate-target/a.js:5 -Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/b.py:3' +Mismatch __examples__/duplicate-target/a.js:5 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/b.py:3' Make sure you've made the parallel changes in the source file, if necessary (12345 != 249234014) -Mismatch duplicate-target/b.py:3 -Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/a.js:4' +Mismatch __examples__/duplicate-target/b.py:3 +Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/a.js:4' Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083) - checksync -u duplicate-target/a.js duplicate-target/b.py + checksync -u __examples__/duplicate-target/a.js __examples__/duplicate-target/b.py " `; exports[`Integration Tests (see __examples__ folder) should report example duplicate-target to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["duplicate-target/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/duplicate-target/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "duplicate-target/**" + "**/duplicate-target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -688,41 +702,42 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/duplicate-target/a.js", "ROOT_DIR/__examples__/duplicate-target/b.py" ] -Verbose duplicate-target/a.js +Verbose __examples__/duplicate-target/a.js File has errors; skipping auto-fix -Fix duplicate-target/a.js:4 -Updated checksum for sync-tag 'update_me' referencing 'duplicate-target/b.py:3' from 12352 to 249234014. -Fix duplicate-target/a.js:5 +Fix __examples__/duplicate-target/a.js:4 +Updated checksum for sync-tag 'update_me' referencing '__examples__/duplicate-target/b.py:3' from 12352 to 249234014. +Fix __examples__/duplicate-target/a.js:5 Removed duplicate target for sync-tag 'update_me' -Verbose duplicate-target/b.py +Verbose __examples__/duplicate-target/b.py File has errors; skipping auto-fix -Fix duplicate-target/b.py:3 -Updated checksum for sync-tag 'update_me' referencing 'duplicate-target/a.js:4' from 4567 to 2050223083. +Fix __examples__/duplicate-target/b.py:3 +Updated checksum for sync-tag 'update_me' referencing '__examples__/duplicate-target/a.js:4' from 4567 to 2050223083. - checksync -u duplicate-target/a.js duplicate-target/b.py + checksync -u __examples__/duplicate-target/a.js __examples__/duplicate-target/b.py 🎉 Everything is in sync!" `; exports[`Integration Tests (see __examples__ folder) should report example duplicate-target to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["duplicate-target/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/duplicate-target/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/duplicate-target/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "duplicate-target/**" + "**/duplicate-target/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -733,7 +748,7 @@ Verbose Discovered paths: [ ] { "version": "0.0.0", - "launchString": "checksync -u duplicate-target/a.js duplicate-target/b.py", + "launchString": "checksync -u __examples__/duplicate-target/a.js __examples__/duplicate-target/b.py", "files": { "__examples__/duplicate-target/a.js": [ { @@ -751,7 +766,7 @@ Verbose Discovered paths: [ }, { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (12352 != 249234014)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (12352 != 249234014)", "location": { "line": 3 }, @@ -760,12 +775,12 @@ Verbose Discovered paths: [ "line": 4, "text": " // sync-start:update_me 249234014 __examples__/duplicate-target/b.py", "declaration": " // sync-start:update_me 12352 __examples__/duplicate-target/b.py", - "description": "Updated checksum for sync-tag 'update_me' referencing 'duplicate-target/b.py:3' from 12352 to 249234014." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/duplicate-target/b.py:3' from 12352 to 249234014." } }, { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (12345 != 249234014)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/b.py:3'. Make sure you've made the parallel changes in the source file, if necessary (12345 != 249234014)", "location": { "line": 3 }, @@ -774,14 +789,14 @@ Verbose Discovered paths: [ "line": 5, "text": " // sync-start:update_me 249234014 __examples__/duplicate-target/b.py", "declaration": " // sync-start:update_me 12345 __examples__/duplicate-target/b.py", - "description": "Updated checksum for sync-tag 'update_me' referencing 'duplicate-target/b.py:3' from 12345 to 249234014." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/duplicate-target/b.py:3' from 12345 to 249234014." } } ], "__examples__/duplicate-target/b.py": [ { "code": "mismatched-checksum", - "reason": "Looks like you changed the target content for sync-tag 'update_me' in 'duplicate-target/a.js:4'. Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083)", + "reason": "Looks like you changed the target content for sync-tag 'update_me' in '__examples__/duplicate-target/a.js:4'. Make sure you've made the parallel changes in the source file, if necessary (4567 != 2050223083)", "location": { "line": 4 }, @@ -790,7 +805,7 @@ Verbose Discovered paths: [ "line": 3, "text": "# sync-start:update_me 2050223083 __examples__/duplicate-target/a.js", "declaration": "# sync-start:update_me 4567 __examples__/duplicate-target/a.js", - "description": "Updated checksum for sync-tag 'update_me' referencing 'duplicate-target/a.js:4' from 4567 to 2050223083." + "description": "Updated checksum for sync-tag 'update_me' referencing '__examples__/duplicate-target/a.js:4' from 4567 to 2050223083." } } ] @@ -799,22 +814,23 @@ Verbose Discovered paths: [ `; exports[`Integration Tests (see __examples__ folder) should report example end_with_no_start to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["end_with_no_start/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/end_with_no_start/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "end_with_no_start/**" + "**/end_with_no_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -822,32 +838,33 @@ Verbose Exclude globs: [ Verbose Discovered paths: [ "ROOT_DIR/__examples__/end_with_no_start/example.js" ] -Error end_with_no_start/example.js:5 +Error __examples__/end_with_no_start/example.js:5 Sync-end for 'end_with_no_start' found, but there was no corresponding sync-start - end_with_no_start/example.js + __examples__/end_with_no_start/example.js " `; exports[`Integration Tests (see __examples__ folder) should report example end_with_no_start to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["end_with_no_start/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/end_with_no_start/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "end_with_no_start/**" + "**/end_with_no_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -855,31 +872,32 @@ Verbose Exclude globs: [ Verbose Discovered paths: [ "ROOT_DIR/__examples__/end_with_no_start/example.js" ] -Error end_with_no_start/example.js:5 +Error __examples__/end_with_no_start/example.js:5 Sync-end for 'end_with_no_start' found, but there was no corresponding sync-start - end_with_no_start/example.js + __examples__/end_with_no_start/example.js " `; exports[`Integration Tests (see __examples__ folder) should report example end_with_no_start to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["end_with_no_start/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/end_with_no_start/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/end_with_no_start/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "end_with_no_start/**" + "**/end_with_no_start/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -906,22 +924,23 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. `; exports[`Integration Tests (see __examples__ folder) should report example excluded to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["excluded/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/excluded/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "excluded/**" + "**/excluded/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -931,23 +950,24 @@ Error No matching files" `; exports[`Integration Tests (see __examples__ folder) should report example excluded to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["excluded/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/excluded/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "excluded/**" + "**/excluded/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -957,22 +977,23 @@ Error No matching files" `; exports[`Integration Tests (see __examples__ folder) should report example excluded to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["excluded/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/excluded/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/excluded/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "excluded/**" + "**/excluded/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -982,112 +1003,115 @@ Error No matching files" `; exports[`Integration Tests (see __examples__ folder) should report example ignore_files_at_different_depths to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["ignore_files_at_different_depths/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/ignore_files_at_different_depths/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "ignore_files_at_different_depths/**" + "**/ignore_files_at_different_depths/**" ] Verbose Exclude globs: [ "**/excluded/**" ] -Verbose IGNORED : ignore_files_at_different_depths/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/alsoignorethis.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose UNIGNORED: ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/alsoignorethis.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose UNIGNORED: __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/some/ignore-file.txt Verbose Discovered paths: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js" ] -Error ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js:5 +Error __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js:5 Sync-end for 'end_with_no_start' found, but there was no corresponding sync-start - ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js + __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js " `; exports[`Integration Tests (see __examples__ folder) should report example ignore_files_at_different_depths to match snapshot with autofix dryrun 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["ignore_files_at_different_depths/**"],"autoFix":true,"dryRun":true} +"Verbose Options from arguments: {"includeGlobs":["**/ignore_files_at_different_depths/**"],"autoFix":true,"dryRun":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":true,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":true,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Info DRY-RUN: Files will not be modified Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "ignore_files_at_different_depths/**" + "**/ignore_files_at_different_depths/**" ] Verbose Exclude globs: [ "**/excluded/**" ] -Verbose IGNORED : ignore_files_at_different_depths/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/alsoignorethis.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose UNIGNORED: ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/alsoignorethis.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose UNIGNORED: __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/some/ignore-file.txt Verbose Discovered paths: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js" ] -Error ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js:5 +Error __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js:5 Sync-end for 'end_with_no_start' found, but there was no corresponding sync-start - ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js + __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js " `; exports[`Integration Tests (see __examples__ folder) should report example ignore_files_at_different_depths to match snapshot with json 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["ignore_files_at_different_depths/**"],"json":true} +"Verbose Options from arguments: {"includeGlobs":["**/ignore_files_at_different_depths/**"],"json":true} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":true,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/ignore_files_at_different_depths/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "ignore_files_at_different_depths/**" + "**/ignore_files_at_different_depths/**" ] Verbose Exclude globs: [ "**/excluded/**" ] -Verbose IGNORED : ignore_files_at_different_depths/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/alsoignorethis.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignore-file.txt by ignore_files_at_different_depths/some/ignore-file.txt -Verbose IGNORED : ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/ignore-file.txt -Verbose UNIGNORED: ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/ignorethesewhennotinsome/bad-sync-tags-never-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/alsoignorethis.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignore-file.txt by __examples__/ignore_files_at_different_depths/some/ignore-file.txt +Verbose IGNORED : __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/ignore-file.txt +Verbose UNIGNORED: __examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js by __examples__/ignore_files_at_different_depths/some/ignore-file.txt Verbose Discovered paths: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignorethesewhennotinsome/bad-sync-tags-that-get-parsed.js" ] @@ -1110,22 +1134,23 @@ Error 🛑 Unfixable errors found. Fix the errors and try again. `; exports[`Integration Tests (see __examples__ folder) should report example malformed_end to match snapshot 1`] = ` -"Verbose Options from arguments: {"includeGlobs":["malformed_end/**"]} +"Verbose Options from arguments: {"includeGlobs":["**/malformed_end/**"]} Verbose Looking for configuration file based on root marker... Verbose Checking ROOT_DIR/.checksyncrc... Verbose Checking ROOT_DIR/.checksyncrc.json... Verbose Found configuration file: ROOT_DIR/.checksyncrc.json +Verbose Changing working directory to ROOT_DIR Verbose Loading configuration from ROOT_DIR/.checksyncrc.json Verbose Validating configuration Verbose Configuration is valid Verbose Options from config: {"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery.","autoFix":false,"comments":["//","#","{/*"],"dryRun":false,"excludeGlobs":["**/excluded/**"],"ignoreFiles":["**/ignore-file.txt"],"json":false} -Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["malformed_end/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} +Verbose Combined options with defaults: {"autoFix":false,"json":false,"comments":["//","#","{/*"],"excludeGlobs":["**/excluded/**"],"dryRun":false,"ignoreFiles":["**/ignore-file.txt"],"includeGlobs":["**/malformed_end/**"],"$schema":"./src/checksync.schema.json","$comment":"This is the config file for our integration tests. By not specifying it directly, we also test configuration file discovery."} Verbose Ignore files: [ "ROOT_DIR/__examples__/ignore_files_at_different_depths/ignore-file.txt", "ROOT_DIR/__examples__/ignore_files_at_different_depths/some/ignore-file.txt" ] Verbose Include globs: [ - "malformed_end/**" + "**/malformed_end/**" ] Verbose Exclude globs: [ "**/excluded/**" @@ -1134,39 +1159,40 @@ Verbose Discovered paths: [ "ROOT_DIR/__examples__/malformed_end/malformed_badid.js", "ROOT_DIR/__examples__/malformed_end/malformed_noid.js" ] -Error malformed_end/malformed_badid.js:7 +Error __examples__/malformed_end/malformed_badid.js:7 Malformed sync-end: format should be 'sync-end: