Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24
21 changes: 18 additions & 3 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@emulsify/cli",
"version": "1.12.0",
"version": "1.12.1",
"description": "Command line interface for Emulsify",
"repository": "git@github.com:emulsify-ds/emulsify-cli.git",
"author": "Patrick Coffey <patrickcoffey48@gmail.com>",
"license": "GPL-2.0",
"private": false,
"engines": {
"node": ">=16.13"
"node": ">=24"
},
"bin": {
"emulsify": "dist/index.js"
Expand Down
9 changes: 5 additions & 4 deletions src/handlers/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('init', () => {
expect.assertions(3);
await init(progress)('cornflake');
expect(gitCloneMock).toHaveBeenCalledWith(
'https://github.com/emulsify-ds/emulsify-drupal.git',
'https://github.com/emulsify-ds/emulsify-drupal-starter.git',
'/home/uname/Projects/cornflake/themes/cornflake',
{ '--branch': 'main' },
);
Expand All @@ -60,7 +60,8 @@ describe('init', () => {
name: 'cornflake',
},
starter: {
repository: 'https://github.com/emulsify-ds/emulsify-drupal.git',
repository:
'https://github.com/emulsify-ds/emulsify-drupal-starter.git',
},
},
);
Expand Down Expand Up @@ -150,7 +151,7 @@ describe('init', () => {
await init(progress)('cornflake');
expect(logMock).toHaveBeenCalledWith(
'error',
'Unable to pull down https://github.com/emulsify-ds/emulsify-drupal.git: Error: Does not exist!',
'Unable to pull down https://github.com/emulsify-ds/emulsify-drupal-starter.git: Error: Does not exist!',
1,
);
});
Expand All @@ -176,7 +177,7 @@ describe('init', () => {
await init(progress)('cornflake', root);
expect(logMock).toHaveBeenCalledWith(
'error',
'Unable to find an Emulsify starter for your project. Please specify one using the --starter flag: emulsify init myTheme --starter https://github.com/emulsify-ds/emulsify-drupal.git',
'Unable to find an Emulsify starter for your project. Please specify one using the --starter flag: emulsify init myTheme --starter https://github.com/emulsify-ds/emulsify-drupal-starter.git',
1,
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ program
)
.option(
'-s --starter <repository>',
'Git repository of the Emulsify starter you would like to use, such as the Emulsify Drupal theme: https://github.com/emulsify-ds/emulsify-drupal.git',
'Git repository of the Emulsify starter you would like to use, such as the Emulsify Drupal theme: https://github.com/emulsify-ds/emulsify-drupal-starter.git',
)
.option(
'-c --checkout <commit/branch/tag>',
Expand Down
3 changes: 2 additions & 1 deletion src/util/getAvailableStarters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ describe('getAvailableStarters', () => {
checkout: 'main',
platform: 'drupal',
platformMajorVersion: 11,
repository: 'https://github.com/emulsify-ds/emulsify-drupal.git',
repository:
'https://github.com/emulsify-ds/emulsify-drupal-starter.git',
},
];

Expand Down
2 changes: 1 addition & 1 deletion src/util/getAvailableStarters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function getAvailableStarters(): EmulsifyStarter[] {
{
platform: 'drupal',
platformMajorVersion: 11,
repository: 'https://github.com/emulsify-ds/emulsify-drupal.git',
repository: 'https://github.com/emulsify-ds/emulsify-drupal-starter.git',
checkout: 'main',
},
];
Expand Down
8 changes: 5 additions & 3 deletions src/util/getGitRepoNameFromUrl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ describe('getGitRepoNameFromUrl', () => {
expect.assertions(1);
expect(
getGitRepoNameFromUrl(
'https://github.com/emulsify-ds/emulsify-drupal.git',
'https://github.com/emulsify-ds/emulsify-drupal-starter.git',
),
).toBe('emulsify-drupal');
).toBe('emulsify-drupal-starter');
});

it('can throw an Error if given an invalid git url', () => {
Expand All @@ -23,7 +23,9 @@ describe('getGitRepoNameFromUrl', () => {
getGitRepoNameFromUrl('');
}).toThrow(Error);
expect(() => {
getGitRepoNameFromUrl('https://github.com/emulsify-ds/emulsify-drupal');
getGitRepoNameFromUrl(
'https://github.com/emulsify-ds/emulsify-drupal-starter',
);
}).toThrow(Error);
});
});
Loading