Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into remove-titanium
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 authored Jan 25, 2018
2 parents afb5e23 + f16a923 commit baf138e
Show file tree
Hide file tree
Showing 51 changed files with 11,742 additions and 14,087 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tmp/*
src/appforms/dist/
dist/
libs/generated/lawnchair.js
test/sync/testServer
src/modules-cov/*
src-cov/*
src/appforms/tests/feedhenry.js
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog - FeedHenry Javascript SDK

## 2.24.0 - 2018-01-25
* Added `headers` parameter to CloudOptions

## 2.20.0 - 2017-06-30

* RHMAP-4738 - Upgraded the rules engine to validate repeating sections.

## 2.19.0 - 2017-06-29

* RHMAP-16063 fix Client apps with disabled connection tags still working and the cloud calls not fail
* Fix sync namespace to user lowercase name
* Add browserify-shim as a dependency
* Move fh-js-sdk to use upstream sync client

## 2.18.5 - 2017-05-08

* Recreate mock_uuid cookie if blank string
* RHMAP-15272 - fh-wfm-sync does not allow overwriting sync options per dataset
* FH-2763 - Write JavaScript documentation (JSDoc) for the public API in fh-js-sdk

## 2.18.4 - 2017-02-20

* RHMAP-13542 - Cannot Submit Map Location Data in Android Apps Built Using Android Form Builder

## 2.18.3 - 2017-02-16

* RAINCATCH-570 - update to the new browser api

## 2.18.2 - 2017-02-03

* RHMAP-12426 - Bug when section break component is used more than 10 times in an form with pages

## 2.18.1 - 2017-01-04

* RHMAP-12719 - Add an exception handler around doCloudCall so any exceptions can call the failure callback
* RHMAP-11544 - Forms - "Blank" Dropdown options pass the required validation
* fhconfig.json with local:true and host will skip FH.init for local dev
* RHMAP-7811 - Add declaration file for TypeScript

## 2.17.5 - 2016-11-18

* RHMAP-11349 Stop submitting value in hidden field

## 2.17.4 - 2016-11-09 - Niall Donnelly

* Added getUID function to public $fh.sync API.
Expand Down
43 changes: 32 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module.exports = function(grunt) {
dest: './test/browser/browserified_tests.js',
options: {
external: [ './src/feedhenry.js' ],
ignore: ['../../src-cov/modules/ajax', '../../src-cov/modules/events', '../../src-cov/modules/queryMap', '../../src-cov/modules/sync-cli', '../../src-cov/feedhenry'],
ignore: ['../../src-cov/modules/ajax', '../../src-cov/modules/events', '../../src-cov/modules/queryMap', '../../src-cov/feedhenry'],
// Embed source map for tests
debug: true
}
Expand Down Expand Up @@ -209,6 +209,10 @@ module.exports = function(grunt) {
options: {
spawn: false
}
},
appforms: {
files: ['src/appforms/src/**/**/*'],
tasks: ['appforms']
}
},
uglify: {
Expand Down Expand Up @@ -240,20 +244,26 @@ module.exports = function(grunt) {
}
},
shell: {
jscov: {
//NOTE: install node-jscoverage first from here: https://github.com/visionmedia/node-jscoverage
command: 'jscoverage src/ src-cov/ --exclude=appforms',
options: {
stdout: true
}
},
htmlcov: {
//NOTE: install jsoncov2htmlcov first from here: https://github.com/plasticine/json2htmlcov
command: 'json2htmlcov rep/coverage.json > rep/coverage.html',
command: 'cat rep/coverage.json | ./node_modules/.bin/json2htmlcov > rep/coverage.html',
options: {
stdout: true
}
}
},
jscoverage: {
src: {
expand: true,
cwd: 'src/',
src: ['*.js', 'modules/**/*.js'],
dest: 'src-cov/',
ext: '.js',
}
},
coveralls: {
target: {
src: 'rep/coverage.lcov'
}
}
});

Expand All @@ -268,6 +278,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks("grunt-jscoverage");
grunt.loadNpmTasks('grunt-coveralls');

var spawns = [];
grunt.registerTask('start-local-servers', function () {
Expand Down Expand Up @@ -313,6 +325,13 @@ module.exports = function(grunt) {

});

grunt.registerTask('json2lcov', function() {
var jsoncovToLcov = require('json2lcov');
var jsonCovResult = grunt.file.readJSON('rep/coverage.json');
var lcov = jsoncovToLcov(jsonCovResult);
grunt.file.write('rep/coverage.lcov', lcov);
});

var stopLocalServers = function(){
spawns.forEach(function (server) {
grunt.log.writeln("Killing process " + server.pid);
Expand Down Expand Up @@ -340,7 +359,9 @@ module.exports = function(grunt) {

grunt.registerTask('concat-core-sdk', ['jshint', 'concat:lawnchair', 'concat:crypto', 'browserify:dist', 'concat:forms_core', 'concat:forms_sdk','concat:forms_core_no_v2', 'concat-forms-backbone']);

grunt.registerTask('coverage', ['shell:jscov', 'browserify:require_cov', 'browserify:test_cov', 'connect:server', 'mocha_phantomjs:test_coverage', 'shell:htmlcov']);
grunt.registerTask('coverage', ['jscoverage', 'browserify:require_cov', 'browserify:test_cov', 'connect:server', 'mocha_phantomjs:test_coverage', 'shell:htmlcov', 'json2lcov']);

grunt.registerTask('default', 'jshint concat-core-sdk concat:forms_appFormsTest test uglify:dist zip');

grunt.registerTask('appforms', ['replace:forms_templates', 'concat:forms_backbone', 'concat:forms_backboneRequireJS','concat:forms_core', 'concat:forms_sdk','concat:forms_core_no_v2' ]);
};
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ git push origin master
Our SDK is release on [npmjs](https://www.npmjs.com/package/fh-js-sdk). To do a release follow those steps:

### Prepare release
* Update ```package.json```, ```npm-shrinkwrap.json```, ``` ``` file with the new version number.
* Update ```package.json```, ```npm-shrinkwrap.json```, ```bower.json``` file with the new version number.
* Update ```CHANGELOG.md``` with some JIRA link
* Do a PR, make sure Travis build passed. Merge.
* Tag the repository with the new version number:
Expand Down Expand Up @@ -166,11 +166,15 @@ npm publish
```

### Generate API doc
The documentation is generated from `fh-js-sdk.d.ts`.
The documentation is generated from `fh-js-sdk.d.ts`.
The generated doc is comitted in `doc/` folder and deployed to `gh-pages` so that feedhenry.org and portal documentation can pick it up from a published location.

To publish doc, run the command:
```
npm run doc
```
Go to [gh-pages](https://github.com/feedhenry/fh-js-sdk/tree/gh-pages) and see recent commit for the publication.

### Sync client development

Sync client development should be done in [fh-sync-js repository] (https://github.com/feedhenry/fh-sync-js)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fh-js-sdk",
"version": "2.17.0",
"version": "2.19.0",
"homepage": "https://github.com/feedhenry/fh-js-sdk",
"authors": [
"[email protected]"
Expand Down
Loading

0 comments on commit baf138e

Please sign in to comment.