Skip to content

Commit

Permalink
Fix unhanded rejection warnings for cache decorated functions.
Browse files Browse the repository at this point in the history
Fix _toRecordResult errors caused by jsforce bug.
  • Loading branch information
Codeneos committed Oct 1, 2020
1 parent e0ffd0f commit f9f9148
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 45 deletions.
86 changes: 45 additions & 41 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog Vlocity Salesforce Integration for VSCode
# Changelog Vlocity/Salesforce Integration for VSCode

## [0.14.8] - 2019-08-07
## Version 0.14.9 - 2019-09-30
- Fix unhanded rejection warnings for cache decorated functions.
- Fix `_toRecordResult` errors caused by jsforce bug.

## Version 0.14.8 - 2019-08-07
- Rewrite and restructure core components
- Support new Datapack Deployment mode called `direct` this mode allows for direct deployments of datapacks using the Collections ot Bulk API from salesforce. For large deployments this significantly improves the deployment times by up to 90%.
- All new Salesforce logs explorer which allows viewing of Salesforce logs similar to the developer console.
Expand All @@ -13,16 +17,16 @@
- New command to purge all debug logs from the server
- New command to set which logs to show in the logs panel

## [0.12.14] - 2019-03-26
## Version 0.12.14 - 2019-03-26
- Fix lookup datapac keys typo.
- Fix sonar cloud token error in travis config.

## [0.12.13] - 2019-02-19
## Version 0.12.13 - 2019-02-19
- Fix refresh datapack error
- More logging for Salesforce deployments
- Force all production deployment requests to check only

## [0.12.12] - 2019-02-19
## Version 0.12.12 - 2019-02-19
- Auto create and delete `-meta.xml` files for classes
- Auto create boiler plate code for APEX classes and interfaces
- Better metadata deployment support for structured data such as email templates and documents
Expand All @@ -36,17 +40,17 @@
- By default enabled Salesforce commands (can be disabled trough settings)
- Bump all dependencies to the latest version

## [0.12.10] - 2019-01-14
## Version 0.12.10 - 2019-01-14
- Improve repair datapack dependencies command
- Fix Admin Commands hidden in command pallette
- Add support for auto generation of -meta.xml files for APEX classes
- Add quick create command for Salesforce files
- Add execute anonymous support for APEX

## [0.12.10] - 2019-12-18
## Version 0.12.10 - 2019-12-18
- Fix icon missing for successful actions in activity view

## [0.12.9] - 2019-12-18
## Version 0.12.9 - 2019-12-18
- Support for Salesforce Refresh data from server
- Fix issue with deploying certain metadata types
- Deprecated old configuration for setting the username and password manually.
Expand All @@ -56,17 +60,17 @@
- Change UI Icon for completed activities.
- Store Salesforce prefered API version in config.

## [0.12.6] - 2019-12-09
## Version 0.12.6 - 2019-12-09
- Fixed build error
- Added option to select max depth during refresh and explorer export
- Optimize datapack loading
- Fix issue with content version query definition from Vlocity

## [0.12.5] - 2019-12-09
## Version 0.12.5 - 2019-12-09
- Fixed circular json error during export from datapack explorer.
- Added activity explorer icons.

## [0.12.4] - 2019-12-08
## Version 0.12.4 - 2019-12-08
- Report past and running operations in the new activity screen
- Better handling of export errors by setting ignoreAllErrors property which prevents exports from failing when a dependency fails.
- Better handling of deploy errors.
Expand All @@ -75,48 +79,48 @@
- Fix Terminal Logging line endings do not appear correctly on mac; mac and *nix systems also use /r/n in VSCode terminals for ending lines instead of just /n
- Fix issues with paths for post and pre job APEX; paths are slightly different due to the way VSCode resolves paths causing a deployment error for Templates and Products using default job settings.

## [0.12.2] - 2019-12-01
## Version 0.12.2 - 2019-12-01
- Revert aggressive inline optimizarion in Teser settings preventing the extension from loading properly.

## [0.12.1] - 2019-11-30
## Version 0.12.1 - 2019-11-30
- New experimental support for running Salesforce deploy and delete metadata commands.
- Optimized VSIX package by bundling all components using webpack. This significantly decreases the extension load times providing a much better overall experience.
- New terminal window can be used for logging messages with color support instead of the standard output channel.
- New ability to cancel a datapack command, this will cause the command to cancel finishing up any remaining export/import work after which it will exit.
- Fix an issues in the Datapack explorer that caused a null-ref-like exception when querying datapacks that did not have all props correctly set.
- Fix use query instead ot queryAll as the earlier one should not be cached leading the datapack UI to show outdated items.

## [0.11.6] - 2019-10-17
## Version 0.11.6 - 2019-10-17
- Fix problem where deploy command would walk all child directories to find deployable datapacks causing all found datapacks to be deployed.

## [0.11.5] - 2019-09-23
## Version 0.11.5 - 2019-09-23
- Fix problem with project path resolution on *nix machines
- Use both expansion path as well as project path avoiding APEX file load errors (if project path is correctly configured)

## [0.11.4] - 2019-08-16
## Version 0.11.4 - 2019-08-16
- Update clone and rename Datapack features
- Now correctly regenerate all Global Keys for the parent and the child records during Datapack cloning
- Fix a bug during datapack rename logic that caused properties to be replaced fully when ending on the old name.

## [0.11.3] - 2019-08-14
## Version 0.11.3 - 2019-08-14
- Fix handling of non-object types when calling createRecordProxy for incomplete datapack arrays
- Fix parallel execution not correctly tracking tasks
- Fix vscode toolbar icon not using the correct size
- Migrate to new test structure
- Update dependencies

## [0.11.2] - 2019-07-31
## Version 0.11.2 - 2019-07-31
- Improve build parent keys algorithm.
- Added detection for UI templates for OmniScript when scanning for datapack parents.
- Added DataPack clone to context menu.
- Better handling of multi level Salesforce Records.

## [0.11.1] - 2019-07-17
## Version 0.11.1 - 2019-07-17
### Fixed
- Fix export does not correctly evaluate expression
- Improve handling of on-save-deploy events

## [0.11.0] - 2019-07-08
## Version 0.11.0 - 2019-07-08
### New
- Added support for renaming and cloning datapacks.
- Update for compatibility with VSCode 1.36.0.
Expand All @@ -125,28 +129,28 @@
- Fix crash on datappack service loading without setting an override project file.
- Remove old datapack builder code and related test cases.

## [0.10.7] - 2019-06-20
## Version 0.10.7 - 2019-06-20
### Changed
- Update Vlocity package to 1.11.1
### Fixed
- Patch VLocity package to avoid partial exports for datapacks with more then 10 dependencies

## [0.10.6] - 2019-06-14
## Version 0.10.6 - 2019-06-14
### Fixed
- Fix export from server command fails

## [0.10.5] - 2019-06-05
## Version 0.10.5 - 2019-06-05
### NewA
- Add support for exporting all datapacks of a particular type through datapack explorer.
### Changed
- Expend Salesforce record Proxy
- Change logger to process entries allowing for more flexible logging

## [0.10.4] - 2019-06-03
## Version 0.10.4 - 2019-06-03
### Fixed
- Fix datapack explorer doesn't when there is no custom deploy YAML

## [0.10.3] - 2019-06-03
## Version 0.10.3 - 2019-06-03
### Fixed
- Fix open in salesforce command to not work for datapacks with versions.
- Fix export using only direct dependencies is treated as cancellation.
Expand All @@ -158,7 +162,7 @@
- Refactor select org command to use `@salesforce/core`
- Refactor Vlocity service to provide salesforce connections from a central location

## [0.10.2] - 2019-05-18
## Version 0.10.2 - 2019-05-18
### New
- Support for Custom datapacks defined in custom options YAML file
- Sort datapacks alphabetically in datapack explorer
Expand All @@ -167,12 +171,12 @@
- Open in Salesforce would not always work properly using the frontdoor session ID; for now avoid using the frontdoor.jsp


## [0.10.1] - 2019-05-09
## Version 0.10.1 - 2019-05-09
### Fixed
- Fix bug in switch org command causing null error.
- Prevent log to take focus for each line written; instead only focus on command start.

## [0.10.0] - 2019-05-01
## Version 0.10.0 - 2019-05-01
### New
- Build parent key command
- Admin commands from Command Pallet
Expand All @@ -181,45 +185,45 @@
- Update vlocity tools to 1.9.4
- Update all dependent packages to their latest releases available from NPM

## [0.8.9] - 2018-12-19
## Version 0.8.9 - 2018-12-19
### Changed
- Update vlocity tools to 1.7.11
- Update all dependent packages to their latest releases available from NPM

## [0.8.8] - 2018-12-07
## Version 0.8.8 - 2018-12-07
### Changed
- Update vlocity tools to 1.7.9
- Set dependency level when doing manual export to all, none or direct which will export related object

## [0.8.7] - 2018-12-03
## Version 0.8.7 - 2018-12-03
### Changed
- Optimize plugin packaging

## [0.8.6] - 2018-11-28
## Version 0.8.6 - 2018-11-28
### Security issue
- Fixed critical security issue due malicious dependency in event-stream referenced by dependency

### Changed
- Optimize and compress output using TerserPlugin

## [0.8.4] - 2018-11-22
## Version 0.8.4 - 2018-11-22
### Fixed
- Update to latest stable version of Vlocity build tools (1.7.8)

## [0.8.2] - 2018-11-19
## Version 0.8.2 - 2018-11-19
### Fixed
- Auto select currently open file as argument for the to be executed command instead of throwing an error.

## [0.8.1] - 2018-11-12
## Version 0.8.1 - 2018-11-12
### Fixed
- Handling of rejected APEX errors

## [0.8.0] - 2018-11-11
## Version 0.8.0 - 2018-11-11
### Added
- Support for loading custom override definitions
- Option to automatically activate deployed datapacks; default is on

## [0.7.0] - 2018-11-9
## Version 0.7.0 - 2018-11-9
### Added
- Datapack explorer allowing you to explore and export all datapack enabled objects available in the connect org
- Simplified setup using SFDX for authorizing new orgs and setting up the deployment tools
Expand All @@ -229,15 +233,15 @@
- Deploy command did not work after running an export
- Configuration changes did not reload the extension config causing settings to only reflect after a VSCode restart

## [0.5.1] - 2018-11-5
## Version 0.5.1 - 2018-11-5
### Added
- Ability to export non-existing datapacks directly from within VSCode.
- Better logging to the console; disabled verbose mode by default

### Fixed
- Do not create new instances of the Vlocity build tools for every operation, prevents excessive logging

## [0.4.0] - 2018-11-1 (beta)
## Version 0.4.0 - 2018-11-1 (beta)
### Added
- Resolving datapack types based on folder structure
- Child items can now be resolved back to their parent datapack
Expand All @@ -246,7 +250,7 @@
### Changed
- Do not take input focus while logging, this fixes a rather nasty behavior when editing extensions config

## [0.3.1] - 2018-10-29 (beta)
## Version 0.3.1 - 2018-10-29 (beta)
### Added
- Support for deploying of datapacks from within VSCode
- Preview/framework AngularJS UI for viewing datapacks
Expand All @@ -255,7 +259,7 @@
### Changed
- Build system now uses Webpack for generating extension js files

## [0.2.0] (alpha)
## Version 0.2.0 (alpha)
### Changed
- Initial release of Vlocode with support for refreshing datapacks from the context menu.
- Enabled login using SFDX
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vlocode",
"displayName": "Salesforce Vlocity Integration",
"description": "Salesforce and Vlocity development and deployment extension for VSCode",
"version": "0.14.8",
"version": "0.14.9",
"license": "MIT",
"icon": "resources/icon.png",
"author": {
Expand Down
31 changes: 31 additions & 0 deletions patches/jsforce+1.9.3.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,34 @@ index 66bf93a..1935477 100644

/*--------------------------------------------*/

diff --git a/node_modules/jsforce/lib/connection.js b/node_modules/jsforce/lib/connection.js
index 97ed0b3..6867a7e 100644
--- a/node_modules/jsforce/lib/connection.js
+++ b/node_modules/jsforce/lib/connection.js
@@ -774,7 +774,7 @@ Connection.prototype._createParallel = function(type, records, options) {
if (options.allOrNone || !err.errorCode) {
throw err;
}
- return this._toRecordResult(null, err);
+ return self._toRecordResult(null, err);
});
})
);
@@ -893,7 +893,7 @@ Connection.prototype._updateParallel = function(type, records, options) {
if (options.allOrNone || !err.errorCode) {
throw err;
}
- return this._toRecordResult(record.Id, err);
+ return self._toRecordResult(record.Id, err);
});
})
);
@@ -1089,7 +1089,7 @@ Connection.prototype._destroyParallel = function(type, ids, options) {
if (options.allOrNone || !err.errorCode) {
throw err;
}
- return this._toRecordResult(id, err);
+ return self._toRecordResult(id, err);
});
})
);
2 changes: 0 additions & 2 deletions src/lib/util/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export function cacheFunction<T extends (...args: any[]) => any>(target: T, name
}).catch(err => {
logger.debug(`Delete cached promise due to exception (key: ${key})`, err);
cache.delete(key);
// Rethrow the exceptions so the original handler can handle it
throw err;
});
}
return newValue;
Expand Down

0 comments on commit f9f9148

Please sign in to comment.