diff --git a/.changeset/short-pens-leave.md b/.changeset/short-pens-leave.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/short-pens-leave.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 372d9dc8a24..a63aa4e5336 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -51,6 +51,7 @@ jobs: integration: runs-on: ubuntu-latest timeout-minutes: 10 + if: github.ref_name == 'master' || github.head_ref == 'changeset-release/master' steps: - name: Checkout uses: actions/checkout@v4 @@ -66,7 +67,6 @@ jobs: run: sh ./scripts/tests-ui.sh - name: Wait for release to succeed - if: github.ref_name == 'master' || github.head_ref == 'changeset-release/master' uses: lewagon/wait-on-check-action@v1.3.4 with: ref: "refs/heads/master" @@ -75,13 +75,11 @@ jobs: wait-interval: 30 - name: Run tests (with published version) - if: github.ref_name == 'master' || github.head_ref == 'changeset-release/master' run: pnpm test:integration env: PUBLISHED_NPM_TAG: next - name: Run UI tests (with published version) - if: github.ref_name == 'master' || github.head_ref == 'changeset-release/master' run: sh ./scripts/tests-ui-integration.sh env: PUBLISHED_NPM_TAG: next diff --git a/apps/docs/src/guide/creating-a-fuel-dapp/index.md b/apps/docs/src/guide/creating-a-fuel-dapp/index.md index 16b1778da12..1997f9c5373 100644 --- a/apps/docs/src/guide/creating-a-fuel-dapp/index.md +++ b/apps/docs/src/guide/creating-a-fuel-dapp/index.md @@ -16,15 +16,15 @@ The first step is to run the command: ::: code-group ```sh-vue [npm] -npm create fuels@{{fuels}} +npm create fuels@{{fuels}} -- --npm ``` ```sh-vue [pnpm] -pnpm create fuels@{{fuels}} +pnpm create fuels@{{fuels}} --pnpm ``` ```sh-vue [bun] -bunx --bun create-fuels@{{fuels}} +bunx --bun create-fuels@{{fuels}} --bun ``` ::: diff --git a/apps/docs/src/guide/creating-a-fuel-dapp/options.md b/apps/docs/src/guide/creating-a-fuel-dapp/options.md index 9d2f7932250..96252b5b26d 100644 --- a/apps/docs/src/guide/creating-a-fuel-dapp/options.md +++ b/apps/docs/src/guide/creating-a-fuel-dapp/options.md @@ -10,15 +10,15 @@ The `npm create fuels` command has several command-line options that you can use ::: code-group ```sh-vue [pnpm] -pnpm create fuels@{{fuels}} [project-name] [options] +pnpm create fuels@{{fuels}} --pnpm [project-name] [options] ``` ```sh-vue [npm] -npm create fuels@{{fuels}} -- [project-name] [options] +npm create fuels@{{fuels}} -- --npm [project-name] [options] ``` ```sh-vue [bun] -bunx --bun create-fuels@{{fuels}} [project-name] [options] +bunx --bun create-fuels@{{fuels}} --bun [project-name] [options] ``` ::: diff --git a/packages/create-fuels/package.json b/packages/create-fuels/package.json index ac6b0411e0c..7cc460d11dd 100644 --- a/packages/create-fuels/package.json +++ b/packages/create-fuels/package.json @@ -15,7 +15,7 @@ }, "license": "Apache-2.0", "scripts": { - "build": "tsup", + "build": "tsup && tsc --noEmit", "prepublishOnly": "tsx ./scripts/prepublish.ts" }, "dependencies": { diff --git a/packages/create-fuels/test/integration.test.ts b/packages/create-fuels/test/integration.test.ts index 00c527bbf8e..817a27e2ef9 100644 --- a/packages/create-fuels/test/integration.test.ts +++ b/packages/create-fuels/test/integration.test.ts @@ -41,7 +41,7 @@ describe('`create fuels` package integrity', () => { }); afterEach(() => { - resetFilesystem(paths.root); + resetFilesystem(paths.projectRoot); }); it.each(packageManagerCreateCommands)( @@ -54,8 +54,8 @@ describe('`create fuels` package integrity', () => { `"fuels": "[0-9]+.[0-9]+.[0-9]+-${PUBLISHED_NPM_TAG}-[0-9]+"` ); - const args = generateArgs(paths.root, packageManager).join(' '); - const expectedTemplateFiles = await getAllFiles(paths.sourceTemplate).then((files) => + const args = generateArgs(paths.projectRoot, packageManager).join(' '); + const expectedTemplateFiles = await getAllFiles(paths.templateSource).then((files) => filterOriginalTemplateFiles(files).filter(filterForcBuildFiles) ); @@ -66,9 +66,9 @@ describe('`create fuels` package integrity', () => { ); expect(createFuelsError).toBeUndefined(); - const actualTemplateFiles = await getAllFiles(paths.root); + const actualTemplateFiles = await getAllFiles(paths.projectRoot); expect(actualTemplateFiles.sort()).toEqual(expectedTemplateFiles.sort()); - const packageJson = readFileSync(paths.packageJson, 'utf-8'); + const packageJson = readFileSync(paths.projectPackageJson, 'utf-8'); expect(packageJson).toEqual(expect.stringMatching(expectedPackageJsonInstall)); }, { timeout: 30000 } diff --git a/scripts/tests-ui.sh b/scripts/tests-ui.sh index d5059a25397..d34b2eb057c 100644 --- a/scripts/tests-ui.sh +++ b/scripts/tests-ui.sh @@ -7,11 +7,11 @@ PROJECT_DIR="${PROJECT_DIR-"$ROOT_DIR/templates/nextjs"}" cd $PROJECT_DIR && pnpm run fuels:dev > /dev/null 2>&1 & sleep 5 -cd $PROJECT_DIR && pnpm run dev > /dev/null 2>&1 & +cd $PROJECT_DIR && pnpm run dev > /dev/null 2>&1 & sleep 5 cd $PLAYWRIGHT_DIR -pnpm exec playwright install --with-deps +pnpm exec playwright install --with-deps > /dev/null 2>&1 pnpm exec playwright test pkill next-server