Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: packages validation throw error #48

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
chore
fix
feat
test
scopes: |
action
cli
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"npmClient": "yarn",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"command": {
"publish": {
Expand Down
4 changes: 2 additions & 2 deletions packages/action/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sherlo/action",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"description": "A github action that uploads provided iOS & Android builds to Sherlo and starts a test run",
"license": "MIT",
"author": "Sherlo",
Expand Down Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"sherlo": "^1.1.2"
"sherlo": "^1.1.3-alpha.1"
},
"devDependencies": {
"@types/jest": "^26.0.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/action/release/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sherlo",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"description": "Sherlo CLI for React Native Storybook visual testing",
"keywords": [
"visual testing",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/expoCloudBuilds/expoCloudBuilds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
logSherloIntro,
getPlatformsToTest,
getValidatedCommandParams,
validatePackages,
} from '../../helpers';
import { Options } from '../../types';
import { THIS_COMMAND } from './constants';
Expand All @@ -26,7 +27,7 @@ import {
async function expoCloudBuilds(passedOptions: Options<THIS_COMMAND>) {
logSherloIntro();

// validatePackages(EXPO_CLOUD_BUILDS_COMMAND);
validatePackages(EXPO_CLOUD_BUILDS_COMMAND);

const commandParams = getValidatedCommandParams(
{ command: EXPO_CLOUD_BUILDS_COMMAND, passedOptions },
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/expoUpdate/expoUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
logSherloIntro,
uploadOrReuseBuildsAndRunTests,
getValidatedCommandParams,
validatePackages,
} from '../../helpers';
import { Options } from '../../types';
import { THIS_COMMAND } from './constants';
Expand All @@ -10,7 +11,7 @@ import { getValidatedExpoUpdateData } from './helpers';
async function expoUpdate(passedOptions: Options<THIS_COMMAND>): Promise<{ url: string }> {
logSherloIntro();

// validatePackages(THIS_COMMAND);
validatePackages(THIS_COMMAND);

const commandParams = getValidatedCommandParams(
{ command: THIS_COMMAND, passedOptions },
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/localBuilds/localBuilds.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { logSherloIntro, uploadOrReuseBuildsAndRunTests } from '../../helpers';
import { logSherloIntro, uploadOrReuseBuildsAndRunTests, validatePackages } from '../../helpers';
import { Options } from '../../types';
import { getValidatedCommandParams } from '../../helpers';
import { THIS_COMMAND } from './constants';

async function localBuilds(passedOptions: Options<THIS_COMMAND>): Promise<{ url: string }> {
logSherloIntro();

// validatePackages(THIS_COMMAND);
validatePackages(THIS_COMMAND);

const commandParams = getValidatedCommandParams(
{ command: THIS_COMMAND, passedOptions },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { throwError } from '../../helpers';

function getPackageVersion(packageName: string): string | null {
try {
const pkgPath = require.resolve(`${packageName}/package.json`);

return require(pkgPath).version;
} catch {
return null;
} catch (error) {
throwError({ type: 'unexpected', error });
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.1.2"}
{"version": "1.1.3-alpha.1"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.1.2"}
{"version": "1.1.3-alpha.1"}
4 changes: 2 additions & 2 deletions packages/react-native-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sherlo/react-native-storybook",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"description": "Sherlo is a Visual Testing tool for React Native Storybook",
"keywords": [
"visual testing",
Expand Down Expand Up @@ -48,7 +48,7 @@
"base-64": "^0.1.0",
"jsencrypt": "^3.3.2",
"node-forge": "^1.3.1",
"sherlo": "^1.1.2",
"sherlo": "^1.1.3-alpha.1",
"utf8": "^3.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions testing/expo-storybook-7/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sherlo/expo-storybook-7",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"private": true,
"main": "index.ts",
"scripts": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.0.1",
"@react-native-community/slider": "4.5.2",
"@sherlo/testing-components": "^1.1.2",
"@sherlo/testing-components": "^1.1.3-alpha.1",
"expo": "^51.0.38",
"expo-dev-client": "~4.0.28",
"expo-localization": "~15.0.3",
Expand All @@ -43,7 +43,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@sherlo/react-native-storybook": "^1.1.2",
"@sherlo/react-native-storybook": "^1.1.3-alpha.1",
"@storybook/addon-essentials": "^8.3.5",
"@storybook/addon-interactions": "^8.3.5",
"@storybook/addon-links": "^8.3.5",
Expand Down
6 changes: 3 additions & 3 deletions testing/expo-storybook-8/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sherlo/expo-storybook-8",
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"private": true,
"main": "index.ts",
"scripts": {
Expand All @@ -25,7 +25,7 @@
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.0.1",
"@react-native-community/slider": "4.5.2",
"@sherlo/testing-components": "^1.1.2",
"@sherlo/testing-components": "^1.1.3-alpha.1",
"expo": "^51.0.38",
"expo-dev-client": "~4.0.28",
"expo-linear-gradient": "~13.0.2",
Expand All @@ -44,7 +44,7 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@sherlo/react-native-storybook": "^1.1.2",
"@sherlo/react-native-storybook": "^1.1.3-alpha.1",
"@storybook/react-native": "^8.3.9",
"babel-loader": "^8.2.3",
"storybook": "^8.3.6",
Expand Down
4 changes: 2 additions & 2 deletions testing/testing-components/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@sherlo/testing-components",
"private": true,
"version": "1.1.2",
"version": "1.1.3-alpha.1",
"description": "Shared components for the monorepo",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc"
},
"dependencies": {
"@sherlo/react-native-storybook": "^1.1.2",
"@sherlo/react-native-storybook": "^1.1.3-alpha.1",
"react": "18.2.0",
"react-native": "0.74.5"
},
Expand Down
Loading