Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump deps and add wireit #72

Open
wants to merge 23 commits into
base: old-main-pnh
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb965a7
fix: bump deps and add wireit
peternhale Mar 29, 2023
850186d
chore: fix nuts workflow
peternhale Mar 29, 2023
9d75c75
chore: remove circleci config
peternhale Mar 30, 2023
e569751
chore: add support for prerelease
peternhale Mar 30, 2023
6a8bc96
chore: test debugging
peternhale Mar 30, 2023
9e5c8ae
chore: add prerelease actions
iowillhoit Mar 30, 2023
f2977ec
fix: sf-ify "lightning generate lwc test"
jshackell-sfdc Mar 30, 2023
a031203
fix: quick sf-ication of setup/run command messages
jshackell-sfdc Apr 3, 2023
c39a092
Merge branch 'js/sfify-mesages' of github.com:salesforcecli/plugin-lw…
peternhale Apr 3, 2023
a1fffa2
chore: fix test assertions
peternhale Apr 5, 2023
de48309
chore: stab at changes
mshanemc Apr 6, 2023
3237e0c
Merge branch 'sm/updates' into phale/repo-setup
mshanemc Apr 6, 2023
a7592b2
chore: remove unused dep
mshanemc Apr 6, 2023
c651f52
fix: invalid flag leads to undefined (#75)
mshanemc Apr 6, 2023
54e8ced
chore: ensure backward compatibility
peternhale Apr 7, 2023
a92240b
chore: document backward compatibility approach and fix tests
peternhale Apr 7, 2023
7f45fd6
chore: properly hand json and loglevel flags
peternhale Apr 7, 2023
afe8b14
Update src/commands/lightning/run/lwc/test.ts
peternhale Apr 10, 2023
81b9f4b
fix: don't redeclare const
mshanemc Apr 10, 2023
5e032ab
chore: wip
peternhale Apr 11, 2023
b27077e
chore: fix tests generate schema
peternhale Apr 11, 2023
afabd97
chore: update UTs
peternhale Apr 12, 2023
21df255
chore: use command json to control jest json results
peternhale Apr 14, 2023
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
103 changes: 0 additions & 103 deletions .circleci/config.yml

This file was deleted.

7 changes: 1 addition & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
module.exports = {
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/migration'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/prefer-includes': 'off',
'class-methods-use-this': 'off',
},
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/recommended'],
};
17 changes: 8 additions & 9 deletions .github/workflows/onPushToMain.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# test
name: version, tag and github release

on:
push:
branches: [main]
branches:
- main
- prerelease/*
tags-ignore:
- "*"

jobs:
release:
# this job will throw if prerelease is true but it doesn't have a prerelease-looking package.json version
uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@main
secrets: inherit

# most repos won't use this
# depends on previous job to avoid git collisions, not for any functionality reason
# docs:
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main
# secrets: inherit
# needs: release
with:
prerelease: ${{ github.ref_name != 'main' }}
14 changes: 13 additions & 1 deletion .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,23 @@ on:
type: string
required: true
jobs:
# parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0)
getDistTag:
outputs:
tag: ${{ steps.distTag.outputs.tag }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
id: distTag
npm:
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
needs: [getDistTag]
with:
ctc: true
sign: true
tag: latest
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
secrets: inherit
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
command:
- 'yarn test:nuts:package'
- 'yarn test:nuts:package1'
- 'yarn test:nuts'
fail-fast: false
with:
os: ${{ matrix.os }}
Expand Down
55 changes: 48 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
*-debug.log
*-error.log
/.nyc_output
/dist
/lib
/package-lock.json
/tmp
# -- CLEAN
tmp/
# use yarn by default, so ignore npm
package-lock.json

# never checkin npm config
.npmrc

# debug logs
npm-error.log
yarn-error.log


# compile source
lib

# test artifacts
*xunit.xml
*checkstyle.xml
*unitcoverage
.nyc_output
coverage
test_session*

# generated docs
docs

# ignore sfdx-trust files
*.tgz
*.sig
package.json.bak.

# -- CLEAN ALL
*.tsbuildinfo
.eslintcache
.wireit
node_modules

# --
# put files here you don't want cleaned with sf-clean

# os specific files
.DS_Store
.idea
.iml

oclif.manifest.json
*.tsbuildinfo
/.wireit
/.eslintcache
60 changes: 41 additions & 19 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
[
{
"command": "lightning:generate:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": ["file", "json", "loglevel"],
"alias": ["force:lightning:lwc:test:create"]
},
{
"command": "lightning:run:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": ["debug", "json", "loglevel", "watch"],
"alias": ["force:lightning:lwc:test:run"]
},
{
"command": "lightning:setup:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": ["json", "loglevel"],
"alias": ["force:lightning:lwc:test:setup"]
}
]
{
"command": "lightning:generate:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": [
"file",
"json",
"loglevel"
],
"alias": [
"force:lightning:lwc:test:create"
]
},
{
"command": "lightning:run:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": [
"coverage",
"debug",
"json",
"loglevel",
"skipApiVersionCheck",
"updateSnapshot",
"verbose",
"watch"
],
"alias": [
"force:lightning:lwc:test:run"
]
},
{
"command": "lightning:setup:lwc:test",
"plugin": "@salesforce/sfdx-plugin-lwc-test",
"flags": [
"json",
"loglevel"
],
"alias": [
"force:lightning:lwc:test:setup"
]
}
]
18 changes: 8 additions & 10 deletions messages/create.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# example
# examples

$ <%= config.bin %> <%= command.id %> -f force-app/main/default/lwc/myButton/myButton.js
- Create a Lightning web component test file called myButton.test.js for the myButton component:

# commandDescription
<%= config.bin %> <%= command.id %> --filef force-app/main/default/lwc/myButton/myButton.js

creates a Lightning web component test file with boilerplate code inside a **tests** directory.
# summary

# longDescription
Create a Lightning web component test file.

Creates a **tests** directory in the specified directory. Creates a yourComponentName.test.js file with boilerplate code in the **tests** directory.

# filepathFlagDescription
# description

path to Lightning web component .js file to create a test for
Creates a **tests** directory in the specified directory. Creates a yourComponentName.test.js file with boilerplate code in the **tests** directory.

# filepathFlagLongDescription
# flags.file.summary

Path to Lightning web component .js file to create a test for.

Expand Down
Loading