Skip to content

Commit

Permalink
feat: rename tasks to steps and type to task
Browse files Browse the repository at this point in the history
BREAKING CHANGE: All existing configurations must change tasks to steps and type to task
  • Loading branch information
Murat committed Mar 27, 2024
1 parent aa59bf0 commit a899b98
Show file tree
Hide file tree
Showing 52 changed files with 491 additions and 491 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/mocks/mockIntegrateWithDepsYml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export const mockIntegrateWithDepsYml = `
dependencies:
- dep-package
- dep-package-2
tasks:
- type: app_delegate
steps:
- task: app_delegate
label: 'App Delegate'
actions:
- block: didFinishLaunchingWithOptions
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/mocks/mockIntegrateWithMinRNVersion.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// language=yaml
export const mockIntegrateWithMinRNVersionYml = `
minRNVersion: 0.71
tasks:
- type: app_delegate
steps:
- task: app_delegate
label: 'App Delegate'
actions:
- block: didFinishLaunchingWithOptions
Expand All @@ -11,8 +11,8 @@ tasks:
// language=yaml
export const mockIntegrateWithInvalidMinRNVersionYml = `
minRNVersion: invalid
tasks:
- type: app_delegate
steps:
- task: app_delegate
label: 'App Delegate'
actions:
- block: didFinishLaunchingWithOptions
Expand All @@ -21,8 +21,8 @@ tasks:
// language=yaml
export const mockIntegrateWithMinVersionYml = `
minVersion: 0.1
tasks:
- type: app_delegate
steps:
- task: app_delegate
label: 'App Delegate'
actions:
- block: didFinishLaunchingWithOptions
Expand All @@ -31,8 +31,8 @@ tasks:
// language=yaml
export const mockIntegrateWithInvalidMinVersionYml = `
minVersion: invalid
tasks:
- type: app_delegate
steps:
- task: app_delegate
label: 'App Delegate'
actions:
- block: didFinishLaunchingWithOptions
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/mocks/mockIntegrateYml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ preInfo: Config pre info
postInfo:
title: test
message: Config post info
tasks:
- type: prompt
steps:
- task: prompt
actions:
- name: test2
type: text
Expand All @@ -31,21 +31,21 @@ tasks:
options:
- value: opt1
- value: opt2
- type: app_delegate
- task: app_delegate
name: app_delegate
label: 'Will not run'
when:
test: false
actions: []
- type: app_delegate
- task: app_delegate
when:
test: true
label: 'App Delegate'
actions:
- prepend: "#import <Firebase.h>"
- block: didFinishLaunchingWithOptions
prepend: "[FIRApp configure];"
- type: app_delegate
- task: app_delegate
preInfo: Task pre info
postInfo: Task post info
actions:
Expand Down
34 changes: 17 additions & 17 deletions src/__tests__/unit/tasks/androidManifestTask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('androidManifestTask', () => {
it('should throw if setting attributes with empty block', async () => {
const content = '';
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
attributes: {
Expand All @@ -37,7 +37,7 @@ describe('androidManifestTask', () => {
it('should skip if condition not met', async () => {
const content = '';
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
when: { test: 'random' },
Expand All @@ -59,7 +59,7 @@ describe('androidManifestTask', () => {
it('should throw if block is invalid', async () => {
const content = '';
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'random' as any,
Expand All @@ -78,7 +78,7 @@ describe('androidManifestTask', () => {
it('should throw text into empty body ', async () => {
const content = '';
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'activity',
Expand All @@ -98,7 +98,7 @@ describe('androidManifestTask', () => {
it('should prepend text into empty body without block', async () => {
let content = '';
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
prepend: '<test />',
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('androidManifestTask', () => {
const content = mockAndroidManifestTemplate;

const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'activity',
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'application',
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'application',
Expand Down Expand Up @@ -250,7 +250,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand Down Expand Up @@ -289,7 +289,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand Down Expand Up @@ -331,7 +331,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand Down Expand Up @@ -371,7 +371,7 @@ describe('androidManifestTask', () => {
</manifest>
`;
const taskInsertBefore: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand All @@ -382,7 +382,7 @@ describe('androidManifestTask', () => {
],
};
const taskInsertBeforeNonStrict: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand All @@ -409,7 +409,7 @@ describe('androidManifestTask', () => {
})
).resolves.not.toThrowError('insertion point');
const taskInsertAfter: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand All @@ -421,7 +421,7 @@ describe('androidManifestTask', () => {
};

const taskInsertAfterNonStrict: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand Down Expand Up @@ -467,7 +467,7 @@ describe('androidManifestTask', () => {
);
mockFs.writeFileSync(manifestPath, content);
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand All @@ -487,7 +487,7 @@ describe('androidManifestTask', () => {
});
it('should throw when android manifest does not exist', async () => {
const task: AndroidManifestTaskType = {
type: 'android_manifest',
task: 'android_manifest',
actions: [
{
block: 'manifest',
Expand Down
Loading

0 comments on commit a899b98

Please sign in to comment.