@xml-tools/ast
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,1 +0,1 @@ | ||
{"processes":{"195b7cdc-c2a6-43b7-86be-b5af79c3709b":{"parent":null,"children":[]}},"files":{"/home/circleci/repo/packages/ast/lib/api.js":["195b7cdc-c2a6-43b7-86be-b5af79c3709b"],"/home/circleci/repo/packages/ast/lib/build-ast.js":["195b7cdc-c2a6-43b7-86be-b5af79c3709b"],"/home/circleci/repo/packages/ast/lib/utils.js":["195b7cdc-c2a6-43b7-86be-b5af79c3709b"],"/home/circleci/repo/packages/ast/lib/visit-ast.js":["195b7cdc-c2a6-43b7-86be-b5af79c3709b"]},"externalIds":{}} | ||
{"processes":{"cf81d57e-2cde-4a7e-b2ef-1d501de2fa01":{"parent":null,"children":[]}},"files":{"/home/circleci/repo/packages/ast/lib/api.js":["cf81d57e-2cde-4a7e-b2ef-1d501de2fa01"],"/home/circleci/repo/packages/ast/lib/build-ast.js":["cf81d57e-2cde-4a7e-b2ef-1d501de2fa01"],"/home/circleci/repo/packages/ast/lib/utils.js":["cf81d57e-2cde-4a7e-b2ef-1d501de2fa01"],"/home/circleci/repo/packages/ast/lib/visit-ast.js":["cf81d57e-2cde-4a7e-b2ef-1d501de2fa01"]},"externalIds":{}} |
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0](https://github.com/sap/xml-tools/compare/@xml-tools/ast@1.0.0...@xml-tools/ast@2.0.0) (2020-01-20) | ||
### Features | ||
- **parser:** support Basic DocType Declarations ([5b4db21](https://github.com/sap/xml-tools/commit/5b4db21)) | ||
### BREAKING CHANGES | ||
- **parser:** Implementing XmlCstVisitor now requires implementing two additional methods: | ||
(docTypeDecl and externalID) | ||
# [1.0.0](https://github.com/sap/xml-tools/compare/@xml-tools/ast@0.5.0...@xml-tools/ast@1.0.0) (2019-12-08) | ||
@@ -8,0 +19,0 @@ |
# Contribution Guide | ||
Please see the top level [Contribution Guide](../../CONTRIBUTING.md) for common dev flows. | ||
## SnapShot Testing | ||
This package uses a SnapShot testing methodology similar to the one used [in Jest](https://jestjs.io/docs/en/snapshot-testing). | ||
Except that in this case the SnapShots are used to test the expected AST result for a given XML text. | ||
The reasoning behind this is that the AST is a complex and often verbose structure | ||
and therefore it is not practical to manually perform assertions on every single nested property of a given AST. | ||
Particularly as a small change to the AST builder may cause multiple tests to fail, e.g: | ||
- renaming one of the properties of an XMLElement ASTNode. | ||
Instead we are comparing the changes to automatically created expected outputs (snapshots). | ||
- To update all the snapshots run: `yarn snapshots:update`. | ||
- The above script is also needed when adding a new test case input. | ||
Obviously we should not blindly update the snapshots to make the tests pass. | ||
Instead every change(diff) in the snapshots must be manually reviewed to assert that no unexpected changes | ||
have occurred to the expected output and that the AST Builder is behaving as expected. | ||
This package does not have any unique development flows. | ||
Please see the top level [Contribution Guide](../../CONTRIBUTING.md). |
@@ -93,2 +93,14 @@ const { BaseXmlCstVisitor } = require("@xml-tools/parser"); | ||
/** | ||
* @param {docTypeDeclCtx} ctx | ||
*/ | ||
/* istanbul ignore next - place holder*/ | ||
docTypeDecl(ctx, astNode) {} | ||
/** | ||
* @param {ExternalIDCtx} ctx | ||
*/ | ||
/* istanbul ignore next - place holder*/ | ||
externalID(ctx, astNode) {} | ||
/** | ||
* @param ctx {ContentCtx} | ||
@@ -95,0 +107,0 @@ * @param location {SourcePosition} |
{ | ||
"name": "@xml-tools/ast", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "XML Ast and Utilities", | ||
@@ -14,4 +14,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@xml-tools/common": "^0.0.1", | ||
"@xml-tools/parser": "^0.4.0", | ||
"@xml-tools/common": "^0.0.2", | ||
"@xml-tools/parser": "^1.0.0", | ||
"lodash": "4.17.15" | ||
@@ -42,3 +42,3 @@ }, | ||
}, | ||
"gitHead": "0eb759a25234aab3c42a85e2fb30d4301b89fce2" | ||
"gitHead": "6862c222896cf473b1b547e067ded135fac0bf0b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
245323
90
3108
+ Added@xml-tools/common@0.0.2(transitive)
+ Added@xml-tools/parser@1.0.11(transitive)
+ Addedchevrotain@7.1.1(transitive)
+ Addedregexp-to-ast@0.5.0(transitive)
- Removed@xml-tools/common@0.0.1(transitive)
- Removed@xml-tools/parser@0.4.0(transitive)
- Removedchevrotain@6.5.0(transitive)
- Removedregexp-to-ast@0.4.0(transitive)
Updated@xml-tools/common@^0.0.2
Updated@xml-tools/parser@^1.0.0