Skip to content

Commit

Permalink
Merge pull request #1527 from Automattic/remove/babel-plugins
Browse files Browse the repository at this point in the history
chore(dev-deps): remove @babel/plugin-transform-modules-commonjs and babel-plugin-module-resolver
  • Loading branch information
sjinks authored Oct 17, 2023
2 parents fc99e03 + cb6543e commit 67c0c7b
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 246 deletions.
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function mockExit() {
jest.spyOn( console, 'log' ).mockImplementation( () => {} );
jest.spyOn( process, 'exit' ).mockImplementation( mockExit );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-get-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function mockExit() {
jest.spyOn( console, 'log' ).mockImplementation( () => {} );
jest.spyOn( process, 'exit' ).mockImplementation( mockExit );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function mockExit() {
jest.spyOn( console, 'log' ).mockImplementation( () => {} );
jest.spyOn( process, 'exit' ).mockImplementation( mockExit );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function mockExit() {
jest.spyOn( console, 'log' ).mockImplementation( () => {} );
jest.spyOn( process, 'exit' ).mockImplementation( mockExit );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function mockExit() {
jest.spyOn( console, 'log' ).mockImplementation( () => {} );
jest.spyOn( process, 'exit' ).mockImplementation( mockExit );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jest.spyOn( exit, 'withError' ).mockImplementation( () => {
throw 'EXIT WITH ERROR'; // throws to break the flow (the real implementation does a process.exit)
} );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-slowlogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jest.spyOn( exit, 'withError' ).mockImplementation( () => {
throw 'EXIT WITH ERROR'; // throws to break the flow (the real implementation does a process.exit)
} );

jest.mock( 'lib/cli/command', () => {
jest.mock( '../../src/lib/cli/command', () => {
const commandMock = {
argv: () => commandMock,
examples: () => commandMock,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lib/cli/exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jest.spyOn( global.console, 'log' );
const mockExit = jest.spyOn( process, 'exit' ).mockImplementation( () => {} );
const ERROR_CODE = 1;

describe( 'lib/cli/exit', () => {
describe( '../../src/lib/cli/exit', () => {
beforeAll( async () => {
output = '';
mockExit.mockClear();
Expand Down
12 changes: 0 additions & 12 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,5 @@ module.exports = {
},
],
],
plugins: [
'@babel/plugin-transform-modules-commonjs',
[
'module-resolver',
{
root: [ './src' ],
alias: {
root: './',
},
},
],
],
ignore: [ '**/*.d.ts' ],
};
224 changes: 0 additions & 224 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"@automattic/eslint-plugin-wpvip": "0.6.0",
"@babel/cli": "7.22.15",
"@babel/core": "7.22.17",
"@babel/plugin-transform-modules-commonjs": "7.22.15",
"@babel/preset-env": "7.22.15",
"@babel/preset-typescript": "7.22.15",
"@jest/globals": "^29.5.0",
Expand All @@ -127,7 +126,6 @@
"@types/uuid": "^9.0.4",
"@types/xml2js": "^0.4.12",
"babel-jest": "^29.5.0",
"babel-plugin-module-resolver": "5.0.0",
"dockerode": "^3.3.4",
"eslint": "^8.35.0",
"jest": "^29.5.0",
Expand Down

0 comments on commit 67c0c7b

Please sign in to comment.