Skip to content

Commit

Permalink
chore(deps): remove unused cpx dependencies and update used ones to c…
Browse files Browse the repository at this point in the history
…px2 (#4510)

* chore(deps): remove unused cpx dependencies and update used ones to cpx2

* fix: sync package-lock, introduce timeout
  • Loading branch information
pichlermarc authored May 28, 2024
1 parent 7238852 commit 82b7526
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 3,186 deletions.
1 change: 0 additions & 1 deletion experimental/packages/exporter-logs-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.2.0",
Expand Down
1 change: 0 additions & 1 deletion experimental/packages/exporter-logs-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"babel-loader": "8.3.0",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"@types/sinon": "17.0.3",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"babel-loader": "8.3.0",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"@types/sinon": "17.0.3",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"babel-loader": "8.3.0",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"babel-loader": "8.3.0",
"babel-plugin-istanbul": "6.1.1",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cpx2": "2.0.0",
"cross-var": "1.1.0",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('RequireInTheMiddleSingleton', () => {
const onRequireFsPromisesStub = makeOnRequiresStub('fs-promises');
const onRequireCodecovStub = makeOnRequiresStub('codecov');
const onRequireCodecovLibStub = makeOnRequiresStub('codecov-lib');
const onRequireCpxStub = makeOnRequiresStub('cpx');
const onRequireCpxLibStub = makeOnRequiresStub('cpx-lib');
const onRequireCpxStub = makeOnRequiresStub('cpx2');
const onRequireCpxLibStub = makeOnRequiresStub('cpx2-lib');

before(() => {
requireInTheMiddleSingleton.register('fs', onRequireFsStub);
Expand All @@ -53,9 +53,9 @@ describe('RequireInTheMiddleSingleton', () => {
'codecov/lib/codecov.js',
onRequireCodecovLibStub
);
requireInTheMiddleSingleton.register('cpx', onRequireCpxStub);
requireInTheMiddleSingleton.register('cpx2', onRequireCpxStub);
requireInTheMiddleSingleton.register(
'cpx/lib/copy-sync.js',
'cpx2/lib/copy-sync.js',
onRequireCpxLibStub
);
});
Expand Down Expand Up @@ -150,16 +150,19 @@ describe('RequireInTheMiddleSingleton', () => {
describe('non-core module with sub-path', () => {
describe('AND module name matches', () => {
const baseDir = path.resolve(
path.dirname(require.resolve('cpx')),
path.dirname(require.resolve('cpx2')),
'..'
);
const modulePath = path.join('cpx', 'lib', 'copy-sync.js');
const modulePath = path.join('cpx2', 'lib', 'copy-sync.js');
it('should call `onRequire`', () => {
const exports = require('cpx/lib/copy-sync');
assert.deepStrictEqual(exports.__ritmOnRequires, ['cpx', 'cpx-lib']);
const exports = require('cpx2/lib/copy-sync');
assert.deepStrictEqual(exports.__ritmOnRequires, [
'cpx2',
'cpx2-lib',
]);
sinon.assert.calledWithMatch(
onRequireCpxStub,
{ __ritmOnRequires: ['cpx', 'cpx-lib'] },
{ __ritmOnRequires: ['cpx2', 'cpx2-lib'] },
modulePath,
baseDir
);
Expand All @@ -175,7 +178,7 @@ describe('RequireInTheMiddleSingleton', () => {
modulePath,
baseDir
);
});
}).timeout(30000);
});
});
});
Expand Down
1 change: 0 additions & 1 deletion experimental/packages/otlp-grpc-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@types/node": "18.6.5",
"@types/sinon": "17.0.3",
"codecov": "3.8.3",
"cpx": "1.5.0",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.2.0",
Expand Down
Loading

0 comments on commit 82b7526

Please sign in to comment.