Skip to content

Commit

Permalink
Merge pull request #1044 from twilio/FLEXY-5353
Browse files Browse the repository at this point in the history
Flexy 5353 - Fix babel-preset-react-app package in CLI
  • Loading branch information
shyamasish-twilio authored Sep 11, 2024
2 parents ee017a9 + 9e25826 commit 09cbd83
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 235 deletions.
7 changes: 7 additions & 0 deletions changelog/v7.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 7.0.5 (Sep 11th, 2024)

### Fixed

- Fixed warnings and errors on babel/plugin-proposal-private-property-in-object.
- Fixed cli issue when used in `yarn workspaces`

## 7.0.4 (Aug 30th, 2024)

### Fixed
Expand Down
418 changes: 195 additions & 223 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/flex-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"log-symbols": "^4.1.0",
"mkdirp": "^1.0.4",
"net": "^1.0.2",
"npm-get-package-info": "2.0.2",
"open": "^8.2.1",
"ora": "^5.4.1",
"package-json": "^7.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/flex-dev-utils/src/__tests__/updateNotifier.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import npmGetPackageInfo from 'npm-get-package-info';
import packageJson from 'package-json';
import updateNotifier from 'update-notifier';

import * as fs from '../fs';
import { checkForUpdate } from '../updateNotifier';
import { chalk } from '../..';

jest.mock('npm-get-package-info');
jest.mock('package-json');
jest.mock('update-notifier');

const getPackageInfoMock = npmGetPackageInfo as jest.Mock;
const getPackageInfoMock = packageJson as unknown as jest.Mock;
const updateNotifierMock = updateNotifier as unknown as jest.Mock;

describe('checkForUpdate', () => {
Expand Down
9 changes: 2 additions & 7 deletions packages/flex-dev-utils/src/updateNotifier.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import updateNotifier, { NotifyOptions, Settings } from 'update-notifier';
import npmGetPackageInfo from 'npm-get-package-info';
import packageJson from 'package-json';

import { readPackageJson, findUp, readAppPackageJson } from './fs';
import { chalk } from '.';
Expand All @@ -16,12 +16,7 @@ export const checkForUpdate = async (
customMessage: Partial<NotifyOptions> = {},
): Promise<void> => {
const pkg = module.parent ? readPackageJson(findUp(module.parent.filename, 'package.json')) : readAppPackageJson();
const pkgInfo = await npmGetPackageInfo({
name: pkg.name,
version: pkg.version,
info: ['deprecated'],
});

const pkgInfo = await packageJson(pkg.name, { version: pkg.version });
const notifier = updateNotifier({ pkg, updateCheckInterval: 1000, ...settings });

const message = `${
Expand Down
1 change: 1 addition & 0 deletions packages/flex-plugin-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@twilio/flex-dev-utils": "7.0.4",
"babel-jest": "^27.0.0",
"babel-polyfill": "^6.26.0",
Expand Down
1 change: 1 addition & 0 deletions packages/flex-plugin-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@babel/core": "^7.23.7",
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.16.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@k88/cra-webpack-hot-dev-client": "^1.1.0",
"@k88/format-webpack-messages": "^1.1.0",
"@k88/interpolate-html-plugin": "^1.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Commands/FlexPluginsDeploy', () => {
accountSid: 'AC00000000000000000000000000000',
environmentSid: 'ZE00000000000000000000000000000',
domainName: 'ruby-fox-123.twil.io',
CliVersion: '7.0.2',
CliVersion: '7.0.4',
isPublic: false,
nextVersion: '2.0.0',
pluginUrl: 'https://ruby-fox-123.twil.io/plugin-url',
Expand Down

0 comments on commit 09cbd83

Please sign in to comment.