angular-pipes
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -0,1 +1,27 @@ | ||
# 5.0.0 | ||
## Fixes | ||
* Fix CountPipe | ||
* Fix EveryPipe test | ||
* Add IsNilPipe to boolean module | ||
## BREAKING CHANGES | ||
* Rename modules (Remove the `2` from `Ng2...`) | ||
+ Angular "2" will now be angular 3 soon with semver, keeping the `2` does not make sense anymore | ||
* Change directory structure | ||
+ The dist folder has been renamed from `pipes` to `dist`. If you have any import to the `pipes` folder, you will need to change it. | ||
+ Aggregate pipes are now in their own folder instead of being in the math folder (import change, see docs). | ||
## Tests | ||
* Removed JSPM to keep things simple. It should be easier to contribute. | ||
+ It now use Karma with a simple webpack preprocessor. | ||
# 4.0.0 | ||
Support for Angular Final | ||
# 3.0.0 | ||
@@ -7,3 +33,3 @@ | ||
# 2.2.0 | ||
# 2.2.0 | ||
@@ -34,7 +60,7 @@ * Update Angular to RC.5 | ||
* Moved categories files to src folder, this means: | ||
+ To import a category you now have to do: `import { NG2_STRING_PIPES } from 'angular-pipes/pipes/src/string'` instead of | ||
+ To import a category you now have to do: `import { NG2_STRING_PIPES } from 'angular-pipes/pipes/src/string'` instead of | ||
`import { NG2_STRING_PIPES } from 'angular-pipes/pipes/string'` | ||
* All the pipes are now **PURE**. This means you have to use `immutability` to update the pipe value. This is a design choice that may be discussed in the future. | ||
* All the pipes are now **PURE**. This means you have to use `immutability` to update the pipe value. This is a design choice that may be discussed in the future. | ||
# 1.6.0 | ||
# 1.6.0 | ||
@@ -89,3 +115,3 @@ ## New pipes | ||
# 1.3.0 | ||
# 1.3.0 | ||
@@ -141,3 +167,3 @@ ## New pipes | ||
## Other | ||
## Other | ||
@@ -144,0 +170,0 @@ * Added documentation |
@@ -8,40 +8,22 @@ module.exports = function (config) { | ||
files: [ | ||
'jspm_packages/npm/zone.js@0.6.18/dist/zone.js', | ||
'jspm_packages/npm/reflect-metadata@0.1.8/Reflect.js' | ||
{ pattern: 'node_modules/zone.js/dist/zone.js', watched: false }, | ||
{ pattern: 'node_modules/reflect-metadata/Reflect.js', watched: false }, | ||
{ pattern: 'dist/test/**/*.js', watched: false } | ||
], | ||
proxies: { | ||
'/index.ts': '/base/index.ts', | ||
'/math.ts': '/base/math.ts', | ||
'/aggregate.ts': '/base/aggregate.ts', | ||
'/boolean.ts': '/base/boolean.ts', | ||
'/array.ts': '/base/array.ts', | ||
'/string.ts': '/base/string.ts', | ||
'/object.ts': '/base/object.ts', | ||
'/test': '/base/test', | ||
'/src': '/base/src', | ||
'/jspm_packages': '/base/jspm_packages', | ||
'/node_modules': '/base/node_modules', | ||
'/tsconfig.json': '/base/tsconfig.json' | ||
preprocessors: { | ||
'dist/test/**/*.js': ['webpack'] | ||
}, | ||
jspm: { | ||
serveFiles: [ | ||
'*.ts', | ||
'src/**/*.ts', | ||
'test/**/*.ts', | ||
'tsconfig.json' | ||
], | ||
loadFiles: [ | ||
'test/main.spec.ts' | ||
], | ||
packages: 'jspm_packages', | ||
config: 'jspm.config.js', | ||
browser: 'jspm.browser.js' | ||
webpack: { | ||
}, | ||
frameworks: ['jspm', 'jasmine'], | ||
webpackMiddleware: { | ||
stats: 'errors-only' | ||
}, | ||
frameworks: ['jasmine'], | ||
browsers: ['Firefox'], | ||
plugins: [ | ||
'karma-jspm', | ||
'karma-webpack', | ||
'karma-coverage', | ||
'karma-jasmine', | ||
@@ -48,0 +30,0 @@ 'karma-spec-reporter', |
{ | ||
"name": "angular-pipes", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Angular 2 pipes library", | ||
"main": "pipes/index.js", | ||
"main": "dist/src/index.js", | ||
"scripts": { | ||
"jspm": "node_modules/.bin/jspm", | ||
"typings": "node_modules/.bin/typings", | ||
"typings-install": "npm run typings install", | ||
"jspm-install": "npm run jspm install", | ||
"prepublish": "node_modules/.bin/gulp clean && npm run typings-install && npm run tsc", | ||
"prepublish": "node_modules/.bin/gulp clean && npm run tsc", | ||
"tsc": "node_modules/.bin/tsc -p .", | ||
"test": "node_modules/.bin/karma start karma.conf.js" | ||
"karma": "node_modules/.bin/karma start karma.conf.js", | ||
"test": "npm run tsc && npm run karma" | ||
}, | ||
@@ -33,85 +30,22 @@ "author": "Florian Knop", | ||
"@angular/core": "^2.1.0", | ||
"es6-shim": "^0.35.0", | ||
"@types/core-js": "^0.9.34", | ||
"@types/jasmine": "^2.5.37", | ||
"core-js": "^2.4.1", | ||
"gulp": "^3.9.1", | ||
"gulp-clean": "^0.3.2", | ||
"jasmine-core": "^2.4.1", | ||
"jspm": "^0.17.0-beta.14", | ||
"karma": "^0.13.22", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-firefox-launcher": "^1.0.0", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-jspm": "^2.1.0", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
"karma-spec-reporter": "0.0.26", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"karma-webpack": "^1.8.0", | ||
"reflect-metadata": "^0.1.8", | ||
"rxjs": "^5.0.0-beta.11", | ||
"symbol-observable": "^0.2.4", | ||
"systemjs": "^0.19.25", | ||
"typescript": "^1.8.9", | ||
"typings": "^0.8.1" | ||
"typescript": "^2.0.8", | ||
"webpack": "^1.13.3", | ||
"zone.js": "^0.6.26" | ||
}, | ||
"dependencies": {}, | ||
"jspm": { | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@angular/core": "npm:@angular/core@^2.1.0", | ||
"assert": "github:jspm/nodelibs-assert@^0.2.0-alpha", | ||
"buffer": "github:jspm/nodelibs-buffer@^0.2.0-alpha", | ||
"constants": "github:jspm/nodelibs-constants@^0.2.0-alpha", | ||
"crypto": "github:jspm/nodelibs-crypto@^0.2.0-alpha", | ||
"events": "github:jspm/nodelibs-events@^0.2.0-alpha", | ||
"fs": "github:jspm/nodelibs-fs@^0.2.0-alpha", | ||
"path": "github:jspm/nodelibs-path@^0.2.0-alpha", | ||
"reflect-metadata": "npm:reflect-metadata@^0.1.8", | ||
"es6-shim": "github:es-shims/es6-shim@^0.35.0", | ||
"os": "github:jspm/nodelibs-os@^0.2.0-alpha", | ||
"plugin-typescript": "github:frankwallis/plugin-typescript@^4.0.9", | ||
"rxjs": "npm:rxjs@5.0.0-beta.12", | ||
"stream": "github:jspm/nodelibs-stream@^0.2.0-alpha", | ||
"string_decoder": "github:jspm/nodelibs-string_decoder@^0.2.0-alpha", | ||
"timers": "github:jspm/nodelibs-timers@^0.2.0-alpha", | ||
"util": "github:jspm/nodelibs-util@^0.2.0-alpha", | ||
"vm": "github:jspm/nodelibs-vm@^0.2.0-alpha", | ||
"zone.js": "npm:zone.js@^0.6.18", | ||
"process": "github:jspm/nodelibs-process@^0.2.0-alpha" | ||
}, | ||
"overrides": { | ||
"npm:@angular/core@2.1.0": { | ||
"meta": { | ||
"src/*.js": { | ||
"deps": [ | ||
"reflect-metadata", | ||
"zone.js" | ||
] | ||
} | ||
} | ||
}, | ||
"npm:inherits@2.0.3": { | ||
"ignore": [ | ||
"test.js" | ||
] | ||
}, | ||
"npm:reflect-metadata@0.1.8": { | ||
"jspmNodeConversion": false, | ||
"map": { | ||
"crypto": { | ||
"node": "@node/crypto", | ||
"default": "@empty" | ||
} | ||
} | ||
}, | ||
"npm:typescript@1.8.10": { | ||
"browser": {}, | ||
"map": { | ||
"buffer": "@empty", | ||
"child_process": "@empty", | ||
"fs": "@empty", | ||
"path": "@empty", | ||
"process": "@empty", | ||
"readline": "@empty" | ||
} | ||
} | ||
} | ||
} | ||
"dependencies": {} | ||
} | ||
100
README.md
@@ -9,11 +9,2 @@ [](https://npmjs.org/package/angular-pipes) | ||
# rc.6 | ||
`3.0.0` comes with `rc.6` version of Angular 2. As planned, all the pipes array like `NG2_PIPES` or `NG2_ARRAY_PIPES` have been removed. | ||
You now need to use the `NgModule`s instead. | ||
# rc.5 support ! | ||
Read the changelog for more information | ||
## Contribute | ||
@@ -37,16 +28,16 @@ | ||
* [`without`](./docs/array.md#without) | ||
* [`range`](./docs/array.md#range) | ||
* [`map`](./docs/array.md#map) | ||
* [`range`](./docs/array.md#range) | ||
* [`map`](./docs/array.md#map) | ||
* [`pluck`](./docs/array.md#pluck) | ||
* [`where`](./docs/array.md#where) | ||
* [`orderBy`](./docs/array.md#orderby) | ||
* [`orderBy`](./docs/array.md#orderby) | ||
* [`reverse`](./docs/array.md#reverse) | ||
* [`count`](./docs/array.md#count) | ||
* [`some`](./docs/array.md#some) | ||
* [`count`](./docs/array.md#count) | ||
* [`some`](./docs/array.md#some) | ||
* [`every`](./docs/array.md#every) | ||
* [`shuffle`](./docs/array.md#shuffle) | ||
* [`take`](./docs/array.md#take) | ||
* [`drop`](./docs/array.md#drop) | ||
* [`deep`](./docs/array.md#deep) | ||
* [`chunk`](./docs/array.md#chunk) | ||
* [`shuffle`](./docs/array.md#shuffle) | ||
* [`take`](./docs/array.md#take) | ||
* [`drop`](./docs/array.md#drop) | ||
* [`deep`](./docs/array.md#deep) | ||
* [`chunk`](./docs/array.md#chunk) | ||
@@ -66,3 +57,3 @@ | ||
* [`undefined`](./docs/boolean.md#undefined) | ||
* [`nil`](./docs/boolean.md#nil) | ||
* [`nil`](./docs/boolean.md#nil) | ||
* [`number`](./docs/boolean.md#number) | ||
@@ -83,7 +74,7 @@ * [`string`](./docs/boolean.md#string) | ||
* [`radians`](./docs/math.md#radians) | ||
* [`random`](./docs/math.md#random) | ||
* [`pow`](./docs/math.md#pow) | ||
* [`random`](./docs/math.md#random) | ||
* [`pow`](./docs/math.md#pow) | ||
* [`sqrt`](./docs/math.md#sqrt) | ||
### Aggregate | ||
### Aggregate | ||
@@ -106,9 +97,9 @@ * [`min`](./docs/aggregate.md#min) | ||
* [`newlines`](./docs/string.md#newlines) | ||
* [`capitalize`](./docs/string.md#capitalize) | ||
* [`upperfirst`](./docs/string.md#upperfirst) | ||
* [`template`](./docs/string.md#template) | ||
* [`capitalize`](./docs/string.md#capitalize) | ||
* [`upperfirst`](./docs/string.md#upperfirst) | ||
* [`template`](./docs/string.md#template) | ||
* [`encodeURI`](./docs/string.md#encodeuri) | ||
* [`encodeURIComponent`](./docs/string.md#encodeuricomponent) | ||
* [`repeat`](./docs/string.md#repeat) | ||
* [`truncate`](./docs/string.md#truncate) | ||
* [`truncate`](./docs/string.md#truncate) | ||
@@ -138,48 +129,4 @@ | ||
```typescript | ||
import { NG2_PIPES } from 'angular-pipes'; | ||
Check the [`documentation`](./docs) for how to import your pipes in your `NgModule` and how to use individual pipes. | ||
@Component({ | ||
// ... | ||
pipes: [NG2_PIPES] | ||
// ... | ||
}} | ||
``` | ||
You can also import only one category and a string pipe. | ||
```typescript | ||
import { NG2_BOOLEAN_PIPES, SplitPipe } from 'angular-pipes'; | ||
@Component({ | ||
// ... | ||
pipes: [NG2_BOOLEAN_PIPES, SplitPipe] | ||
// ... | ||
}} | ||
``` | ||
But this will import all the files, you can do better by importing | ||
just the boolean files. | ||
```typescript | ||
import { NG2_BOOLEAN_PIPES } from 'angular-pipes/pipes/boolean'; | ||
import { SplitPipe } from 'angular-pipes/pipes/string'; | ||
``` | ||
Same thing for the other categories. | ||
And if you want to only include one file: | ||
```typescript | ||
import { HeadPipe } from 'angular-pipes/pipes/src/array/head.pipe'; | ||
``` | ||
The boolean pipes are only in two files, the types are in `types.pipe.ts` and the | ||
conditions are in `conditions.pipe.ts` | ||
If you only use one or two pipes, it's better to include only those two files. It will be lighter. | ||
There is no bundle available (everything in one file), this project let you bundle as you wish. But the compiled JS is available. | ||
## Tests | ||
@@ -189,12 +136,9 @@ | ||
npm install | ||
npm run lite | ||
jspm install | ||
``` | ||
And navigate to `/unit-tests.html`. | ||
It may take some time for the files to transpile. | ||
* TODO: Rework tests to remove JSPM | ||
`TODO`: Karma | ||
## License | ||
[`MIT`](./LICENSE.md) | ||
[`MIT`](./LICENSE.md) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12715
10
55
138
1