forked from aws-amplify/amplify-cli
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: yarn modern install workspace (aws-amplify#13197)
* fix: yarn modern install workspace * chore: update yarn.lock * chore: update yarn.lock * chore: update api * test: add yarn 3 test to standalone * Revert "test: add yarn 3 test to standalone" This reverts commit 37be610. * fix: build function error and add test * chore: change fs.writeFile to Sync * chore: add test to codeBuild * fix: fix pr check --------- Co-authored-by: 0.618 <[email protected]>
- Loading branch information
Showing
7 changed files
with
267 additions
and
208 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
packages/amplify-e2e-tests/src/__tests__/build-function-yarn-modern.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import execa from 'execa'; | ||
import { | ||
addFunction, | ||
createNewProjectDir, | ||
deleteProject, | ||
deleteProjectDir, | ||
functionBuild, | ||
initJSProjectWithProfile, | ||
} from '@aws-amplify/amplify-e2e-core'; | ||
|
||
describe('build successfully via Yarn Modern', () => { | ||
let projRoot: string; | ||
|
||
beforeEach(async () => { | ||
projRoot = await createNewProjectDir('analytics'); | ||
await execa('corepack', ['enable'], { cwd: projRoot }); | ||
await execa('yarn', ['init', '-2'], { cwd: projRoot }); | ||
await execa('yarn', ['--version'], { cwd: projRoot }); | ||
}); | ||
|
||
afterEach(async () => { | ||
await deleteProject(projRoot); | ||
deleteProjectDir(projRoot); | ||
}); | ||
|
||
it('add analytics and function', async () => { | ||
await initJSProjectWithProfile(projRoot, {}); | ||
await addFunction( | ||
projRoot, | ||
{ | ||
functionTemplate: 'Hello World', | ||
}, | ||
'nodejs', | ||
); | ||
await functionBuild(projRoot); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.