Skip to content

Commit

Permalink
Merge pull request #632 from amtrack/fix/deps
Browse files Browse the repository at this point in the history
fix(deps): update dependencies and switch from yarn to npm
  • Loading branch information
amtrack authored Oct 26, 2024
2 parents 9c98e04 + ee7ad3d commit bacc233
Show file tree
Hide file tree
Showing 12 changed files with 15,717 additions and 6,488 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:
node-version-file: .node-version
- name: Install dependencies
run: |
yarn install
yarn global add @salesforce/cli@${SF_CLI_VERSION:-"latest"}
npm ci
npm install --global @salesforce/cli@${SF_CLI_VERSION:-"latest"}
- name: Run unit tests
run: yarn test
run: npm run test
- name: Authenticate DevHub and create scratch org
env:
SFDX_AUTH_URL_DEVHUB: ${{ secrets.SFDX_AUTH_URL_DEVHUB }}
run: |
sf org login sfdx-url -d -a devhub -f <(echo "${SFDX_AUTH_URL_DEVHUB}")
yarn develop
npm run develop
- name: Run end-to-end tests
run: yarn test:e2e
run: npm run test:e2e
- name: Delete scratch org
if: always()
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:
node-version-file: .node-version
- name: Install dependencies
run: |
yarn install
yarn global add @salesforce/cli@${SF_CLI_VERSION:-"latest"}
npm ci
npm install --global @salesforce/cli@${SF_CLI_VERSION:-"latest"}
- name: Run unit tests
run: yarn test
run: npm run test
- name: Authenticate DevHub and create scratch org
env:
SFDX_AUTH_URL_DEVHUB: ${{ secrets.SFDX_AUTH_URL_DEVHUB }}
run: |
sf org login sfdx-url -d -a devhub -f <(echo "${SFDX_AUTH_URL_DEVHUB}")
yarn develop --release preview
npm run develop --release preview
- name: Run end-to-end tests
run: yarn test:e2e
run: npm run test:e2e
- name: Delete scratch org
if: always()
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/.nyc_output
/dist
/lib
/package-lock.json
/tmp
node_modules
/.sfdx
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
> Note: Make sure to run these commands in your `sfdx-browserforce-plugin` directory.
```console
yarn install
npm ci
```

## Scaffolding a new plugin
Expand All @@ -29,7 +29,7 @@ Let's say you want to develop a new plugin to enable/disable `Administrators Can
You can scaffold a new plugin by running:

```console
yarn run generate:plugin --name AdminsCanLogInAsAnyUser
npm run generate:plugin --name AdminsCanLogInAsAnyUser
```

Run `git status` afterwards to see what files have been generated.
Expand All @@ -42,7 +42,7 @@ TypeScript code needs to be transpiled to JavaScript.
To do this, run the following command:

```console
yarn run build
npm run build
```

Bravo 👏, you have just generated a working browserforce plugin!
Expand Down Expand Up @@ -159,7 +159,7 @@ To run **unit tests**:
> Note: Make sure to run these commands in your sfdx-browserforce-plugin directory.
```console
yarn test
npm run test
```

To run the **end to end tests**, you might want to create a new **default scratch org** first.
Expand All @@ -171,8 +171,8 @@ sf org create scratch -f config/project-scratch-def.json -d
```

```console
yarn run test:e2e
yarn run test:e2e -- -g "AdminsCanLogInAsAnyUser" # will only run tests matching `AdminsCanLogInAsAnyUser`
npm run test:e2e
npm run test:e2e -- -g "AdminsCanLogInAsAnyUser" # will only run tests matching `AdminsCanLogInAsAnyUser`
```

> Note: You can run the e2e tests in non-headless mode (opening a browser) by setting the environment variable `BROWSER_DEBUG=true`.
Loading

0 comments on commit bacc233

Please sign in to comment.