diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..fcfcf33 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,31 @@ +env: + es6: true + node: true +extends: + - standard +globals: + Atomics: readonly + SharedArrayBuffer: readonly +parser: '@typescript-eslint/parser' +parserOptions: + ecmaVersion: 11 +plugins: + - '@typescript-eslint' +rules: + eqeqeq: warn + no-tabs: warn + no-useless-escape: warn + no-void: warn + camelcase: warn + no-mixed-spaces-and-tabs: warn + no-redeclare: warn + no-array-constructor: warn + no-mixed-operators: warn + no-undef: warn + no-unused-vars: warn + promise/param-names: warn + func-call-spacing: warn + new-cap: warn + no-unexpected-multiline: warn + no-proto: warn + no-prototype-builtins: warn \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9a9108d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: node_js +branches: + only: + - master + - addTravis + - /^\d+\.\d+\.(\d|[x]) +env: + global: +# - SDK=javascript +# - SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH +#before_install: cd packages/optimizely-sdk +install: npm install +script: npm test +after_success: npm run coveralls + +# Integration tests need to run first to reset the PR build status to pending +stages: + - 'Lint' + - 'Test' + +jobs: + include: + - stage: 'Lint' + node_js: '12' + script: npm run lint + after_success: travis_terminate 0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 929d2eb..261071e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # vscode extension for Optimizely +## Unreleased + +## 0.1.0 +October 9, 2020 + - Upgrade `@optimizely/optimizely-sdk` to [4.3.4](https://github.com/optimizely/javascript-sdk/releases/tag/v4.3.4) in debug dialog. + +## 0.0.8 +October 7, 2020 + - Add new method `getFeatureVariableJSON` to support JSON feature variables. ([#8](https://github.com/optimizely/optimizely-vscode/pull/8)) + - Add feature key tracking to underline a feature key that is not in datafile.([#11](https://github.com/optimizely/optimizely-vscode/pull/11)) + - Add `getAllFeatureVariables` to auto-complete and hide `variables` view in debug dialog for `isFeatureEnabled` and `getAllFeatureVariables` methods.([#12](https://github.com/optimizely/optimizely-vscode/pull/12)) + - Add `track` to auto-complete.([#14](https://github.com/optimizely/optimizely-vscode/pull/14)) + +## 0.0.6 +May 25, 2020 + - Update README to mention minimum vscode version. + ## 0.0.5 May 21, 2020 - Fix debug dialog attribute table. diff --git a/README.md b/README.md index 8759105..bbc0a5d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,16 @@ # Optimizely VSCode Extension -The Optimizely VSCode extension lets you access Feature Keys, Experiment Keys and Feature Variables via auto-complete for javascript typescript and react. If not using these languages, you can use the keyboard shortcuts below to insert your experiment and feature keys. +The Optimizely VSCode extension autocompletes the following parameters in Javascript, Typescript, and React: +- feature keys +- experiment keys +- feature variables +- event keys + +In other languages, you can insert the preceding list of elements using the following keyboard shortcuts. + +This extension also evaluates if provided feature keys are valid for Optimizely's public SDK methods (for example, getFeatureVariable(feature_key, userID, attributes), or isFeatureEnabled(feature_key, userID)) for Javascript and TypeScript. If a given feature_key is invalid (i.e., doesn't exist in the datafile for the sdk key used in "Optimizely: config" command), the extension highlights it and displays a warning on hover. + +**Compatibilty:** The Optimizely VSCode extension is compatiable with 1.34 and higher of vscode. It currently supports SDKs versions released *before* February 2020. ## Features diff --git a/debugdialog.html b/debugdialog.html index ae1719d..15ca850 100644 --- a/debugdialog.html +++ b/debugdialog.html @@ -1,6 +1,6 @@ - +