@salesforce/apex-tmlanguage
Advanced tools
Comparing version 1.4.0 to 1.5.0
{ | ||
"name": "@salesforce/apex-tmlanguage", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.", | ||
@@ -35,4 +35,8 @@ "displayName": "apex-tmLanguage", | ||
"compile": "node ./node_modules/typescript/bin/tsc -p .", | ||
"commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force", | ||
"commit": "git-cz", | ||
"watch": "node ./node_modules/typescript/bin/tsc -w -p .", | ||
"test": "gulp test", | ||
"test:soql-tmgrammar": "vscode-tmgrammar-test -s source.soql -g ./grammars/soql.tmLanguage -t './test/soql/*.soql'", | ||
"test:soql-tmgrammar-snapshots": "vscode-tmgrammar-snap -s source.soql -g ./grammars/soql.tmLanguage -t './test/soql/snapshots/*.soql'", | ||
"test": "gulp test; npm run test:soql-tmgrammar; npm run test:soql-tmgrammar-snapshots", | ||
"prepare": "gulp", | ||
@@ -50,4 +54,5 @@ "build:default": "gulp default", | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^7", | ||
"@commitlint/config-conventional": "^7", | ||
"@types/chai": "4.2.8", | ||
@@ -57,2 +62,4 @@ "@types/gulp": "^4.0.5", | ||
"chai": "^4.1.2", | ||
"commitizen": "^3.0.5", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"gulp": "4.0.2", | ||
@@ -68,7 +75,18 @@ "gulp-json2cson": "^2.0.0", | ||
"typescript": "3.7.5", | ||
"vscode-textmate": "4.4.0" | ||
"vscode-textmate": "4.4.0", | ||
"vscode-tmgrammar-test": "^0.0.10" | ||
}, | ||
"volta": { | ||
"node": "12.18.4" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
# Salesforce Apex Language Grammar | ||
[![CircleCI](https://circleci.com/gh/forcedotcom/apex-tmLanguage.svg?style=svg)](https://circleci.com/gh/forcedotcom/apex-tmLanguage) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
@@ -18,5 +19,6 @@ ## Introduction | ||
- Run `npm install` to install any dependencies. | ||
- Run `gulp` to build and run tests. | ||
- Run `gulp` to build. | ||
- Run `npm run test` to run tests. | ||
Output grammars are output in the `grammars\` dirctory. | ||
Output grammars are output in the `grammars/` directory. | ||
@@ -32,6 +34,23 @@ To see the token changes from within the Salesforce VS Code Extensions: | ||
### Tests for SOQL grammar | ||
For the standalone SOQL grammar, tests are executed with [vscode-tmgrammar-tests](https://github.com/PanAeon/vscode-tmgrammar-test). | ||
test/soql/ | ||
|-- simple_account.soql "Manually" created test cases | ||
|-- ... | ||
`-- snapshots/ "Snapshot-based" test cases | ||
|-- example-*.soql | ||
|-- example-*.soql.snap | ||
`-- ... | ||
The difference between manual vs. snapshot tests is that the latter are auto-generated and can be updated with command `vscode-tmgrammar-snap -u`. They are useful to quickly see the output of applying the grammar and catch regressions. | ||
The example-\* queries were taken from [Example SELECT clauses](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_examples.htm). | ||
## Supported outputs | ||
- `grammars\apex.tmLanguage.cson` - for Atom | ||
- `grammars\apex.tmLanguage` - TextMate grammar (XML plist) | ||
- `grammars/apex.tmLanguage.cson` - for Atom | ||
- `grammars/apex.tmLanguage` - TextMate grammar (XML plist) | ||
- `grammars/soql.tmLanguage` - TextMate grammar (XML plist) for standalone SOQL files | ||
@@ -38,0 +57,0 @@ ## Releasing |
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
366139
6
62
20