Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ReactiveX/rxjs into feat-…
Browse files Browse the repository at this point in the history
…opti-refcount
  • Loading branch information
githubxiaowen committed Jun 18, 2019
2 parents 02a9eac + b24d3ea commit 2d70c6c
Show file tree
Hide file tree
Showing 1,073 changed files with 6,976 additions and 17,595 deletions.
86 changes: 86 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,86 @@
## IMPORTANT
# If you change the cache key prefix, also sync the restore_cache fallback to match.
# Keep the static part of the cache key as prefix to enable correct fallbacks.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
var_1: &default_docker_image circleci/node:10.12
var_2: &cache_key rxjs-node-10.12-{{ checksum "package-lock.json" }}

# Settings common to each job
var_3: &defaults
working_directory: ~/ng
docker:
- image: *default_docker_image

var_4: &restore_cache
restore_cache:
keys:
- *cache_key
# This fallback should be the cache_key without variables.
- rxjs-0.7.0-
var_5: &attach_options
at: .

version: 2
jobs:
build:
docker:
- image: *default_docker_image
steps:
- checkout
- *restore_cache
- run: npm i
- run: npm run build_all
- persist_to_workspace:
root: .
paths:
- ./*
- save_cache:
key: *cache_key
paths:
- ./node_modules

lint:
<<: *defaults
steps:
- attach_workspace: *attach_options
- run: npm run lint

test:
<<: *defaults
steps:
- attach_workspace: *attach_options
- run: npm test
- run: npm run test:side-effects

dtslint:
<<: *defaults
steps:
- attach_workspace: *attach_options
- run: npm run dtslint

typescript3:
<<: *defaults
steps:
- attach_workspace: *attach_options
- run: npm i --no-save typescript@3.*
- run: npm run build_cjs

workflows:
version: 2
build_and_test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- dtslint:
requires:
- build
- typescript3:
requires:
- lint
- test
- dtslint
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
integration/side-effects/snapshots/
6 changes: 4 additions & 2 deletions .gitignore
Expand Up @@ -12,15 +12,17 @@ typings/

# Generated
dist/
dist-compat/
tmp/
coverage/
img/
spec-js/
spec-build/
.nyc_output/
.out/

# Misc
npm-debug.log
.DS_STORE

# The check-side-effects package generates and deletes this file.
# If the process is killed, it will be left behind.
check-side-effects.tmp-input.js
50 changes: 0 additions & 50 deletions .make-compat-package.js

This file was deleted.

25 changes: 1 addition & 24 deletions .make-helpers.js
Expand Up @@ -36,30 +36,7 @@ function copySources(rootDir, packageDir, ignoreMissing) {
fs.copySync('./README.md', packageDir + 'README.md');
}

// Create a file that exports the importTargets object
function createImportTargets(importTargets, targetName, targetDirectory) {
const importMap = {};
for (const x in importTargets) {
importMap['rxjs/' + x] = ('rxjs-compat/' + targetName + importTargets[x]).replace(/\.js$/, '');
}

const outputData =
`
"use strict"
var path = require('path');
var dir = path.resolve(__dirname);
module.exports = function() {
return ${JSON.stringify(importMap, null, 4)};
}
`

fs.outputFileSync(targetDirectory + 'path-mapping.js', outputData);
}

module.exports = {
copySources,
createImportTargets,
cleanSourceMapRoot
}
}
45 changes: 0 additions & 45 deletions .make-packages.js
Expand Up @@ -10,7 +10,6 @@ let addLicenseToFile = licenseTool.addLicenseToFile;
let addLicenseTextToFile = licenseTool.addLicenseTextToFile;
let makePackages = require('./.make-helpers');
let copySources = makePackages.copySources;
let createImportTargets = makePackages.createImportTargets;
let cleanSourceMapRoot = makePackages.cleanSourceMapRoot;
let bo = null;
// Build Optimizer is not available on Node 4.x. Using a try/catch
Expand All @@ -27,9 +26,7 @@ const ESM5_ROOT = ROOT + 'esm5/';
const ESM2015_ROOT = ROOT + 'esm2015/';
const UMD_ROOT = ROOT + 'global/';
const ESM5_FOR_ROLLUP_ROOT = ROOT + 'esm5_for_rollup/';
const LEGACY_REEXPORT_ROOT = ROOT + 'legacy-reexport/';
const TYPE_ROOT = ROOT + 'typings/';
const MIGRATION_PKG = ROOT + 'migrations/';
const PKG_ROOT = ROOT + 'package/';
const CJS_PKG = PKG_ROOT + '';
const ESM5_PKG = PKG_ROOT + '_esm5/';
Expand Down Expand Up @@ -75,50 +72,13 @@ klawSync(ESM5_ROOT, {
return fileName;
});

/**
* Get a list of the file names. Sort in reverse order so re-export files
* such as "operators.js" are AFTER their more specfic exports, such as
* "operators/map.js". This is due to a Webpack bug for node-resolved imports
* (rxjs/operators resolves to rxjs/operators.js), Webpack's "alias"
* functionality requires that the most broad mapping (rxjs/operators) be at
* the end of the alias mapping object. Created Webpack issue:
* https://github.com/webpack/webpack/issues/5870
*
* This is only needed for items in legacy-reexport as others should be resolved
* through their package.json.
*/
const fileNames = klawSync(LEGACY_REEXPORT_ROOT, {
nodir: true,
filter: function(item) {
return item.path.endsWith('.js');
}
})
.map(item => item.path)
.map(path => path.slice((`${__dirname}/${LEGACY_REEXPORT_ROOT}`).length))
.sort().reverse();

// Create an object hash mapping imports to file names
const importTargets = fileNames.reduce((acc, fileName) => {
// Get the name of the file to be the new directory
const directory = fileName.slice(0, fileName.length - 3);

acc[directory] = fileName;
return acc;
}, {});

createImportTargets(importTargets, "_esm5/", ESM5_PKG);
createImportTargets(importTargets, "_esm2015/", ESM2015_PKG);

// Make the distribution folder
mkdirp.sync(PKG_ROOT);

// Copy over the sources
copySources('src/', SRC_ROOT_PKG);
// Copy legacy-reexport sources
copySources('legacy-reexport/', SRC_ROOT_PKG);

copySources(CJS_ROOT, CJS_PKG);
fs.copySync(LEGACY_REEXPORT_ROOT, CJS_PKG, {overwrite: false, errorOnExist: true});

// Clean up the source maps for CJS sources
cleanSourceMapRoot(PKG_ROOT, SRC_ROOT_PKG);
Expand All @@ -137,11 +97,6 @@ fs.copySync('src/operators/package.json', PKG_ROOT + '/operators/package.json');
fs.copySync('src/ajax/package.json', PKG_ROOT + '/ajax/package.json');
fs.copySync('src/webSocket/package.json', PKG_ROOT + '/webSocket/package.json');
fs.copySync('src/testing/package.json', PKG_ROOT + '/testing/package.json');
fs.copySync('src/internal-compatibility/package.json', PKG_ROOT + '/internal-compatibility/package.json');

// Copy over migrations
fs.copySync(MIGRATION_PKG, PKG_ROOT + 'migrations/');
fs.copySync('./migrations/collection.json', PKG_ROOT + 'migrations/collection.json');

if (fs.existsSync(UMD_ROOT)) {
fs.copySync(UMD_ROOT, UMD_PKG);
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -46,5 +46,5 @@ script:
- if [ "$FULL_VALIDATE" == "true" ] && [ -n "DANGER_GITHUB_API_TOKEN" ]; then cd docs_app && npm ci && npm run build && cd ..; fi

after_success:
- if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover && npx nyc report --reporter=text-lcov | npx coveralls; fi
- if [ "$FULL_VALIDATE" == "true" ]; then npm run test:cover; fi
- if [ "$FULL_VALIDATE" == "true" ]; then npm run tests2png && cd docs_app && chmod 755 scripts/deploy-to-firebase.sh && npm run deploy-production; fi
55 changes: 55 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,58 @@
## [6.5.2](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.2) (2019-05-10)


### Bug Fixes

* **endWith:** wrap args - they are not observables - in of before concatenating ([#4735](https://github.com/reactivex/rxjs/issues/4735)) ([986be2f](https://github.com/reactivex/rxjs/commit/986be2f))
* **forkJoin:** test for object literal ([#4741](https://github.com/reactivex/rxjs/issues/4741)) ([c11e1b3](https://github.com/reactivex/rxjs/commit/c11e1b3)), closes [#4737](https://github.com/reactivex/rxjs/issues/4737) [#4737](https://github.com/reactivex/rxjs/issues/4737)
* **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538)
* **of:** remove deprecation comment to prevent false positive warning ([#4724](https://github.com/reactivex/rxjs/issues/4724)) ([da69c16](https://github.com/reactivex/rxjs/commit/da69c16))
* **pairwise:** make it recursion-proof ([#4743](https://github.com/reactivex/rxjs/issues/4743)) ([21ab261](https://github.com/reactivex/rxjs/commit/21ab261))
* **scan:** fixed declarations to properly support different return types ([#4598](https://github.com/reactivex/rxjs/issues/4598)) ([126d2b6](https://github.com/reactivex/rxjs/commit/126d2b6))
* **Subscription:** Return Empty when teardown === null ([#4575](https://github.com/reactivex/rxjs/issues/4575)) ([ffc4e68](https://github.com/reactivex/rxjs/commit/ffc4e68))
* **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491)
* **umd:** export fetch namespace ([#4738](https://github.com/reactivex/rxjs/issues/4738)) ([7926122](https://github.com/reactivex/rxjs/commit/7926122))
* **fromFetch:** don't abort if fetch resolves ([#4742](https://github.com/reactivex/rxjs/issues/4742) ([ed8d771](https://github.com/reactivex/rxjs/commit/ed8d771))


## [6.5.1](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.1) (2019-04-23)


### Bug Fixes

* **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538)
* **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491)



# [6.5.0](https://github.com/reactivex/rxjs/compare/6.4.0...6.5.0) (2019-04-23)


### Bug Fixes

* **docs-app:** remove stopWordFilter from lunr pipeline ([#4536](https://github.com/reactivex/rxjs/issues/4536)) ([9eaebd4](https://github.com/reactivex/rxjs/commit/9eaebd4))
* **dtslint:** disable tests that break in TS@next ([#4705](https://github.com/reactivex/rxjs/issues/4705)) ([ecc73d2](https://github.com/reactivex/rxjs/commit/ecc73d2))
* **index:** export NotificationKind ([#4514](https://github.com/reactivex/rxjs/issues/4514)) ([7125355](https://github.com/reactivex/rxjs/commit/7125355)), closes [#4513](https://github.com/reactivex/rxjs/issues/4513)
* **race:** better typings ([#4643](https://github.com/reactivex/rxjs/issues/4643)) ([fb9bc48](https://github.com/reactivex/rxjs/commit/fb9bc48)), closes [#4390](https://github.com/reactivex/rxjs/issues/4390) [#4642](https://github.com/reactivex/rxjs/issues/4642)
* **throwIfEmpty:** ensure result is retry-able ([c4f44b9](https://github.com/reactivex/rxjs/commit/c4f44b9))
* **types:** Fixed signature for onErrorResumeNext ([#4603](https://github.com/reactivex/rxjs/issues/4603)) ([4dd0be0](https://github.com/reactivex/rxjs/commit/4dd0be0))


### Features

* **combineLatest:** deprecated rest argument and scheduler signatures ([#4641](https://github.com/reactivex/rxjs/issues/4641)) ([6661c79](https://github.com/reactivex/rxjs/commit/6661c79)), closes [#4640](https://github.com/reactivex/rxjs/issues/4640)
* **fromFetch:** We now export a `fromFetch` static observable creation method from `rxjs/fetch`. Mirrors native `fetch` only it's lazy and cancellable via `Observable` interface. ([#4702](https://github.com/reactivex/rxjs/issues/4702)) ([5a1ef86](https://github.com/reactivex/rxjs/commit/5a1ef86))
* **forkJoin:** accepts a dictionary of sources ([#4640](https://github.com/reactivex/rxjs/issues/4640)) ([b5a2ac9](https://github.com/reactivex/rxjs/commit/b5a2ac9))
* **partition:** new `partition` observable creation function. Old `partition` operator is deprecated ([#4419](https://github.com/reactivex/rxjs/issues/4419)) ([#4685](https://github.com/reactivex/rxjs/issues/4685)) ([d5d6980](https://github.com/reactivex/rxjs/commit/d5d6980))
* **scheduled:** Add `scheduled` creation function to use to create scheduled observable of values. Deprecate scheduled versions of `from`, `range`, et al. ([#4595](https://github.com/reactivex/rxjs/issues/4595)) ([f57e1fc](https://github.com/reactivex/rxjs/commit/f57e1fc))


### Performance Improvements

* **Subscription:** improve parent management ([#4526](https://github.com/reactivex/rxjs/issues/4526)) ([06f1a25](https://github.com/reactivex/rxjs/commit/06f1a25))



# [6.4.0](https://github.com/reactivex/rxjs/compare/6.3.3...6.4.0) (2019-01-30)


Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
@@ -1,4 +1,4 @@
blesh
benlesh
kwonoj
staltz
trxcllnt
Expand Down

0 comments on commit 2d70c6c

Please sign in to comment.