Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/v2.15.0 #320

Merged
merged 83 commits into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c893cdb
Adds guidelines dependencies and scripts
jbalsas Nov 10, 2017
b7fc707
Formats files acording to guidelines (auto-generated)
jbalsas Nov 10, 2017
b24f44e
Fixes lint errors in metal package
jbalsas Nov 10, 2017
cf77e16
Fixes lint errors in metal-assertions package
jbalsas Nov 10, 2017
7ae6f60
Fixes lint errors in metal-component package
jbalsas Nov 10, 2017
fda278d
Fixes lint errors in metal-dom package
jbalsas Nov 10, 2017
0fa37ce
Fixes lint errors in metal-events package
jbalsas Nov 10, 2017
9d44c39
Fixes lint errors in metal-incrementla-dom package
jbalsas Nov 10, 2017
02e9021
Fixes lint errors in metal-isomorphic package
jbalsas Nov 10, 2017
f5a3ada
Fixes lint errors in metal-jsx package
jbalsas Nov 10, 2017
c1f0411
Fixes lint errors in metal-soy package
jbalsas Nov 10, 2017
308f317
Fixes lint errors in metal-state package
jbalsas Nov 10, 2017
45172ed
Fixes lint errors in metal-web-component package
jbalsas Nov 10, 2017
665fd67
Adds checkFormat and lint to the CI
jbalsas Nov 10, 2017
f6446e4
Adds lint-staged configuration
jbalsas Nov 10, 2017
49b33c1
Updates eslint-config-liferay to 2.0.9
jbalsas Nov 10, 2017
27ce28a
Adds mocha and browser envs to overridden eslintrc file
jbalsas Nov 10, 2017
04ce2c1
Updates test environment to node 8 (LTS)
jbalsas Nov 10, 2017
61d0f4f
Uses var since polyfill does not get transpiled
jbalsas Nov 10, 2017
4aaa677
Merge pull request #293 from metal/feature/updated_guidelines
jbalsas Nov 15, 2017
9d52c83
Merge branch 'master' into develop
jbalsas Nov 15, 2017
172fb18
Add feature test "dispose should emit a disposed event"
Nov 17, 2017
c9fc8a0
Add emit disposed event on Component dispose
Nov 17, 2017
838068a
Merge branch 'master' into develop
jbalsas Nov 17, 2017
7759bba
Update contributing guidelines
Nov 17, 2017
b35811b
Replace gulp-metal with karma
Nov 21, 2017
b56b4c7
Regen package-lock.json
Nov 21, 2017
22c3ac1
Run test:saucelabs script on CI
Nov 21, 2017
bd6d8d2
Run format
Nov 21, 2017
bbaf003
Remove legacy version of Android
Nov 21, 2017
0b84b2e
Merge pull request #299 from p2kmgcl/dispose-event
Nov 21, 2017
46a2d06
Merge pull request #307 from Robert-Frampton/karma
jbalsas Nov 22, 2017
dcc640b
Default STATE values should be preserved when rendering web component…
Nov 21, 2017
05447bc
Using const instead of let
Nov 22, 2017
df918b2
Run format
Nov 22, 2017
d8fe8a5
Merge pull request #309 from Robert-Frampton/webcomp_state
Nov 22, 2017
3f7fa99
Method calls to Config helpers should return new objects to avoid uni…
Nov 22, 2017
a1f7cdb
Import no longer used
Nov 22, 2017
c871c51
Adding prepend function
diegonvs Nov 20, 2017
063af44
Adding test cases for prepend
diegonvs Nov 21, 2017
c27967a
SF after format
diegonvs Nov 21, 2017
6f9bc1a
Now prepend test cases compares a html string
diegonvs Nov 21, 2017
a3c31d6
Adjust prepend to append if parent doesnt have first child and insert…
diegonvs Nov 22, 2017
e4513fa
Enhance tests for prepend
diegonvs Nov 22, 2017
fa668c7
Now prepend in nodelist uses insertBefore
diegonvs Nov 22, 2017
83ca018
Added a prepend test case
diegonvs Nov 22, 2017
b53c1ad
SF for travis
diegonvs Nov 22, 2017
7fe2ca0
Prepend now returns parent
diegonvs Nov 22, 2017
82f806c
Prepend now returns child
diegonvs Nov 22, 2017
f8c70df
JSDoc formatting
Nov 22, 2017
dba3d82
Split large test up into smaller parts, remove redundant section
Nov 22, 2017
ea3f090
Fixing test:coverage script
diegonvs Nov 23, 2017
bbfee49
Merge pull request #313 from diegonvs/coverage
jbalsas Nov 24, 2017
4842f7a
Fixes saucelabs testname
jbalsas Nov 28, 2017
3c088e4
Merge pull request #314 from metal/feature/saucelabs-testname
Nov 28, 2017
0b5c1cf
Modifying shapeOf message
diegonvs Nov 7, 2017
869c466
Modifying function return for improve arrayOf error message
diegonvs Nov 8, 2017
b761c79
Removing 'warning' on error message test
diegonvs Nov 7, 2017
d19d0cb
Removing ‘warning’ on composeError message
diegonvs Nov 7, 2017
4b0a470
Removing unused error messages constraints
diegonvs Nov 7, 2017
6159096
Added a test case that checks if arrayOf can return errors in shapeOf…
diegonvs Nov 7, 2017
e4dfb6f
Adding validation for arguments in arrayOf and objectOf
diegonvs Nov 8, 2017
e51c6c6
Adding tests for invalid arguments in arrayOf and objectOf
diegonvs Nov 8, 2017
2b6c379
SF template literals
diegonvs Nov 13, 2017
7fdb397
Now shapeOf checks args outside maybe function
diegonvs Nov 23, 2017
b778e4c
Fixing test for shapeOf with object not supplied
diegonvs Nov 23, 2017
ad525f4
SF
diegonvs Nov 23, 2017
c16a6f7
When checking the args passed to validators, immediately throw error
Nov 28, 2017
c16a408
Update tests now that error is thrown
Nov 28, 2017
08a83ad
Add tests for error messages returned by arrayOf and shapeOf
Nov 28, 2017
82913d7
Merge pull request #311 from Robert-Frampton/immutableconfig
jbalsas Nov 29, 2017
f103445
Merge pull request #312 from Robert-Frampton/pr-306
jbalsas Nov 29, 2017
9ec3c11
Merge pull request #315 from Robert-Frampton/pr-297
Nov 29, 2017
03a3201
Add links to metaljs.com from package readme files
Nov 29, 2017
c46e0c1
Merge pull request #316 from Robert-Frampton/readmes
jbalsas Nov 30, 2017
df5b641
Adding set function
diegonvs Nov 29, 2017
5ff1df0
Refactoring domData tests
diegonvs Nov 29, 2017
2466d46
Now domData.set can overwrite a data object
diegonvs Dec 1, 2017
f5467cb
Enhancing some domData tests
diegonvs Dec 1, 2017
b7a8962
Do not modify pre-existing tests for get method
Dec 1, 2017
ffc5598
Make domData tests more robust
Dec 1, 2017
402a12e
Allow falsy values for domData.get
Dec 1, 2017
acef053
Merge pull request #319 from Robert-Frampton/pr-317
Dec 1, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
packages/metal-soy-bundle/src/**/*.js
*.soy.js
packages/metal-isomorphic/**/*.js
packages/metal-soy-bundle/**/*.js
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"browser": true,
"node": true
},
"extends": "liferay"
}
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ addons:
secure: rV35O/fLO1NHiINBspiMzvWWtJPBdetUb3bB4mBB2Qrqf0WMRMGJ4Pgkaxl0p9JqAgPMQ/HSQTKLPNKaATc5g6GO46H7N1ykWBLrhsi7YSgopbNwUw95RebaZc42iyfgbnYG1hU8YEmes01UwXLsVup6qNt7X64I+M/KcfM6Cb8=

before_install:
- nvm install 7
- npm install -g gulp
- nvm install 8
- npm install -g [email protected]

install:
Expand All @@ -19,5 +18,7 @@ jdk:
language: java

script:
- gulp test:saucelabs
- npm run checkFormat
- npm run lint
- npm run test:saucelabs
- npm run test:isomorphic
153 changes: 7 additions & 146 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,160 +1,21 @@
'use strict';

var babel = require('gulp-babel');
var compileSoy = require('metal-tools-soy/lib/pipelines/compileSoy');
var gulp = require('gulp');
var karma = require('karma');
var metal = require('gulp-metal');
var path = require('path');
var replace = require('gulp-replace');

var codeGlobs = [
'packages/metal*/src/**/*.js',
'packages/metal*/test/**/*.js',
'!packages/metal*/**/*.soy.js',
'!packages/metal-incremental-dom/**/incremental-dom.js',
'gulpfile.js',
'karma.conf.js',
'karma-coverage.conf.js'
];

metal.registerTasks({
bundleFileName: 'metal.js',
formatGlobs: codeGlobs,
karma: require('karma'),
lintGlobs: codeGlobs,
testDepTasks: ['build:cjs'],
testNodeSrc: [
// Since all files will be added, we need to ensure manually that these
// will be added first.
'packages/metal-incremental-dom/lib/incremental-dom.js',

// Test files
'env/test/node.js',
'packages/metal/test/**/*.js',
'packages/metal-component/test/**/*.js',
'packages/metal-dom/test/**/*.js',
'packages/metal-events/test/**/*.js',
'packages/metal-incremental-dom/test/**/*.js',
'packages/metal-jsx/test/**/*.js',
'packages/metal-soy/test/**/*.js',
'packages/metal-state/test/**/*.js'
],
testSaucelabsBrowsers: {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome'
},
sl_safari_8: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.10'
},
sl_safari_10: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.12',
version: '10'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
sl_ie_9: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '10'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_edge_15: {
base: 'SauceLabs',
browserName: 'microsoftedge',
platform: 'Windows 10',
version: '15'
},
sl_android_4: {
base: 'SauceLabs',
browserName: 'android',
platform: 'Linux',
version: '4.4'
},
sl_android_5: {
base: 'SauceLabs',
browserName: 'android',
platform: 'Linux',
version: '5.0'
}
},
useEslint: true
});
let compileSoy = require('metal-tools-soy/lib/pipelines/compileSoy');
let gulp = require('gulp');
let replace = require('gulp-replace');

gulp.task('soy', function() {
return gulp.src('packages/metal-soy/test/**/*.soy')
return gulp
.src('packages/metal-soy/test/**/*.soy')
.pipe(compileSoy())
.pipe(replace('metal-soy', '../..'))
.pipe(replace('metal-component/src/Component', 'metal-component'))
.pipe(gulp.dest('packages/metal-soy/test'));
});

gulp.task('soy:isomorphic', function() {
return gulp.src('packages/metal-isomorphic/test/**/*.soy')
return gulp
.src('packages/metal-isomorphic/test/**/*.soy')
.pipe(compileSoy())
.pipe(gulp.dest('packages/metal-isomorphic/test'));
});

gulp.task('build:cjs', ['soy'], function() {
return compileToLib('packages/metal*/src/**/*.js');
});

var changedJsSrc;
gulp.task('compile', function() {
return compileToLib(changedJsSrc);
});

// We need to override gulp-metal's default test:watch task so that it will
// update lib files when the related src files change.
gulp.task('test:watch', ['build:cjs'], function(done) { // eslint-disable-line
gulp.watch('packages/metal-soy/test/**/*.soy', ['soy']);
var jsWatcher = gulp.watch('packages/metal*/src/**/*.js', ['compile']);
jsWatcher.on('change', function(event) {
changedJsSrc = event.path;
});

new karma.Server(
{
configFile: path.resolve('karma.conf.js')
}
).start();
});

function calcDestDir(file) {
var relative = path.relative(path.resolve('packages'), file.path);
var index = relative.indexOf(path.sep);
file.base = path.dirname(file.path);
return path.dirname(path.join(
path.resolve('packages'),
relative.substr(0, index),
'lib',
relative.substr(index + 5)
));
}

function compileToLib(src) {
return gulp.src(src)
.pipe(babel({
presets: ['env']
}))
.pipe(gulp.dest(calcDestDir));
}
105 changes: 16 additions & 89 deletions karma-coverage.conf.js
Original file line number Diff line number Diff line change
@@ -1,115 +1,42 @@
'use strict';

var lernaJson = require('./lerna.json');
const karmaConfig = require('./karma.conf.js');
const lernaJson = require('./lerna.json');

module.exports = function(config) {
config.set({
frameworks: ['browserify', 'mocha', 'chai', 'sinon', 'source-map-support'],

files: [
// Since all files will be added, we need to ensure manually that these
// will be added first.
{
pattern: 'packages/metal-incremental-dom/src/incremental-dom.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal-incremental-dom/lib/incremental-dom.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal-soy-bundle/lib/bundle.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal-web-component/node_modules/babel-polyfill/dist/polyfill.min.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal-web-component/node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js',
watched: false,
included: false,
served: true
},
{
pattern: 'packages/metal-web-component/webcomponents_polyfill.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal*/test/**/*.js',
watched: false,
included: true,
served: true
},
{
pattern: 'packages/metal-dom/fixtures/*',
watched: true,
included: false,
served: true
}
],

exclude: ['packages/metal-isomorphic/**/*.js'],
karmaConfig(config);

preprocessors: {
'packages/metal-incremental-dom/src/incremental-dom.js': ['browserify'],
'packages/metal-incremental-dom/lib/incremental-dom.js': ['browserify'],
'packages/metal-soy-bundle/lib/bundle.js': ['browserify'],
'packages/metal*/test/**/*.js': ['browserify']
},

browsers: ['Chrome'],
config.plugins.push('karma-coverage');

config.set({
browserify: {
debug: true,
transform: [
[
'babelify',
{
plugins: [
'istanbul'
],
presets: [
'env'
]
}
]
plugins: ['istanbul'],
presets: ['env'],
},
],
],
insertGlobalVars: {
METAL_VERSION: function() {
return '\'' + lernaJson.version + '\'';
}
}
},
},
},

reporters: ['coverage', 'progress'],

coverageReporter: {
reporters: [
{
type: 'lcov',
subdir: 'lcov'
subdir: 'lcov',
},
{
type: 'text-summary'
}
]
type: 'text-summary',
},
],
},

autoWatch: true,

proxies: {
'/fixtures/': '/base/packages/metal-dom/fixtures/'
}
reporters: ['coverage', 'progress'],
});
};
Loading