Skip to content

Commit 79b1b95

Browse files
authored
feat(rxjs-compat): removed for v7 (#4839)
BREAKING CHANGE: `rxjs/Rx` is no longer a valid import site. BREAKING CHANGE: `rxjs-compat` is not published for v7 (yet)
1 parent 9026a36 commit 79b1b95

File tree

921 files changed

+71
-7659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

921 files changed

+71
-7659
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ typings/
1212

1313
# Generated
1414
dist/
15-
dist-compat/
1615
tmp/
1716
coverage/
1817
img/
@@ -26,4 +25,4 @@ npm-debug.log
2625

2726
# The check-side-effects package generates and deletes this file.
2827
# If the process is killed, it will be left behind.
29-
check-side-effects.tmp-input.js
28+
check-side-effects.tmp-input.js

.make-compat-package.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

.make-helpers.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,7 @@ function copySources(rootDir, packageDir, ignoreMissing) {
3636
fs.copySync('./README.md', packageDir + 'README.md');
3737
}
3838

39-
// Create a file that exports the importTargets object
40-
function createImportTargets(importTargets, targetName, targetDirectory) {
41-
const importMap = {};
42-
for (const x in importTargets) {
43-
importMap['rxjs/' + x] = ('rxjs-compat/' + targetName + importTargets[x]).replace(/\.js$/, '');
44-
}
45-
46-
const outputData =
47-
`
48-
"use strict"
49-
50-
var path = require('path');
51-
var dir = path.resolve(__dirname);
52-
53-
module.exports = function() {
54-
return ${JSON.stringify(importMap, null, 4)};
55-
}
56-
`
57-
58-
fs.outputFileSync(targetDirectory + 'path-mapping.js', outputData);
59-
}
60-
6139
module.exports = {
6240
copySources,
63-
createImportTargets,
6441
cleanSourceMapRoot
65-
}
42+
}

.make-packages.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ let addLicenseToFile = licenseTool.addLicenseToFile;
1010
let addLicenseTextToFile = licenseTool.addLicenseTextToFile;
1111
let makePackages = require('./.make-helpers');
1212
let copySources = makePackages.copySources;
13-
let createImportTargets = makePackages.createImportTargets;
1413
let cleanSourceMapRoot = makePackages.cleanSourceMapRoot;
1514
let bo = null;
1615
// Build Optimizer is not available on Node 4.x. Using a try/catch
@@ -27,9 +26,7 @@ const ESM5_ROOT = ROOT + 'esm5/';
2726
const ESM2015_ROOT = ROOT + 'esm2015/';
2827
const UMD_ROOT = ROOT + 'global/';
2928
const ESM5_FOR_ROLLUP_ROOT = ROOT + 'esm5_for_rollup/';
30-
const LEGACY_REEXPORT_ROOT = ROOT + 'legacy-reexport/';
3129
const TYPE_ROOT = ROOT + 'typings/';
32-
const MIGRATION_PKG = ROOT + 'migrations/';
3330
const PKG_ROOT = ROOT + 'package/';
3431
const CJS_PKG = PKG_ROOT + '';
3532
const ESM5_PKG = PKG_ROOT + '_esm5/';
@@ -75,50 +72,13 @@ klawSync(ESM5_ROOT, {
7572
return fileName;
7673
});
7774

78-
/**
79-
* Get a list of the file names. Sort in reverse order so re-export files
80-
* such as "operators.js" are AFTER their more specfic exports, such as
81-
* "operators/map.js". This is due to a Webpack bug for node-resolved imports
82-
* (rxjs/operators resolves to rxjs/operators.js), Webpack's "alias"
83-
* functionality requires that the most broad mapping (rxjs/operators) be at
84-
* the end of the alias mapping object. Created Webpack issue:
85-
* https://github.com/webpack/webpack/issues/5870
86-
*
87-
* This is only needed for items in legacy-reexport as others should be resolved
88-
* through their package.json.
89-
*/
90-
const fileNames = klawSync(LEGACY_REEXPORT_ROOT, {
91-
nodir: true,
92-
filter: function(item) {
93-
return item.path.endsWith('.js');
94-
}
95-
})
96-
.map(item => item.path)
97-
.map(path => path.slice((`${__dirname}/${LEGACY_REEXPORT_ROOT}`).length))
98-
.sort().reverse();
99-
100-
// Create an object hash mapping imports to file names
101-
const importTargets = fileNames.reduce((acc, fileName) => {
102-
// Get the name of the file to be the new directory
103-
const directory = fileName.slice(0, fileName.length - 3);
104-
105-
acc[directory] = fileName;
106-
return acc;
107-
}, {});
108-
109-
createImportTargets(importTargets, "_esm5/", ESM5_PKG);
110-
createImportTargets(importTargets, "_esm2015/", ESM2015_PKG);
111-
11275
// Make the distribution folder
11376
mkdirp.sync(PKG_ROOT);
11477

11578
// Copy over the sources
11679
copySources('src/', SRC_ROOT_PKG);
117-
// Copy legacy-reexport sources
118-
copySources('legacy-reexport/', SRC_ROOT_PKG);
11980

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

12383
// Clean up the source maps for CJS sources
12484
cleanSourceMapRoot(PKG_ROOT, SRC_ROOT_PKG);
@@ -137,11 +97,6 @@ fs.copySync('src/operators/package.json', PKG_ROOT + '/operators/package.json');
13797
fs.copySync('src/ajax/package.json', PKG_ROOT + '/ajax/package.json');
13898
fs.copySync('src/webSocket/package.json', PKG_ROOT + '/webSocket/package.json');
13999
fs.copySync('src/testing/package.json', PKG_ROOT + '/testing/package.json');
140-
fs.copySync('src/internal-compatibility/package.json', PKG_ROOT + '/internal-compatibility/package.json');
141-
142-
// Copy over migrations
143-
fs.copySync(MIGRATION_PKG, PKG_ROOT + 'migrations/');
144-
fs.copySync('./migrations/collection.json', PKG_ROOT + 'migrations/collection.json');
145100

146101
if (fs.existsSync(UMD_ROOT)) {
147102
fs.copySync(UMD_ROOT, UMD_PKG);

compat/AsyncSubject.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

compat/BehaviorSubject.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

compat/InnerSubscriber.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

compat/Notification.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

compat/Observable.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

compat/Observer.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)