Skip to content

Commit

Permalink
feat!: ESM + Node 18 (#643)
Browse files Browse the repository at this point in the history
* test: normal watcher

* feat: standard fs in most places, node16

* ci: standardized actions

* refactor: ensure dst dir exists on windows

* feat!: migrate to ESM

BREAKING CHANGES: node 18 minimum, ESM exports

* chore: update deps

* chore: update deps and add configs

* chore: all the nice updates

* chore: update eslintignore

* test: remove helper

* fix: use cp

* chore: remove fs-extra

* test: sf integration

* chore: increase timeout

* chore: use cross-spawn again

* fix: cross-spawn import

* test: avoid plugins link

* test: use gz

* test: use .cmd on windows

* test: mixed up scripts

* test: maybe it will pass on windows now

* test: maybe it will pass on windows now

* test: maybe it will pass on windows now

* test: maybe it will pass on windows now

* chore: clean up

* fix(dev-deps): use latest eslint-config-oclif-typescript

* chore: code review

* chore: remove old badges

* chore: update dev scripts

---------

Co-authored-by: mshanemc <[email protected]>
Co-authored-by: svc-cli-bot <[email protected]>
  • Loading branch information
3 people authored Oct 12, 2023
1 parent a0d1178 commit be87bf6
Show file tree
Hide file tree
Showing 34 changed files with 3,550 additions and 1,996 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
11 changes: 0 additions & 11 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/lib
/examples
/dist
12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["oclif", "oclif-typescript", "prettier"],
"rules": {
"unicorn/prefer-module": "off",
"unicorn/no-array-reduce": "off",
"no-useless-constructor": "off"
}
}
4 changes: 2 additions & 2 deletions .git2gus/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"productTag": "a1aB0000000ce2IIAQ",
"defaultBuild": "offcore.tooling.55",
"issueTypeLabels": { "enhancement": "USER STORY", "bug": "BUG P3" },
"defaultBuild": "offcore.tooling.59",
"issueTypeLabels": {"enhancement": "USER STORY", "bug": "BUG P3"},
"hideWorkItemUrl": true,
"statusWhenClosed": "CLOSED"
}
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
automerge:
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main
secrets:
secrets:
SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
with:
mergeMethod: squash
31 changes: 29 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,32 @@ on:
workflow_dispatch:

jobs:
unit-tests:
uses: oclif/github-workflows/.github/workflows/unitTest.yml@main
yarn-lockfile-check:
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
linux-unit-tests:
needs: yarn-lockfile-check
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
windows-unit-tests:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
sf-integration:
needs: linux-unit-tests
strategy:
matrix:
node_version: [lts/*, latest]
os: [ubuntu-latest, windows-latest]
exclude:
- node_version: lts/*
os: windows-latest

fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- run: yarn test:integration:sf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*-debug.log
*-error.log
.oclif.manifest.json
oclif.manifest.json
/dist
/lib
/node_modules
Expand All @@ -9,3 +10,5 @@
/oclif-plugin-update-*.tgz
/.vscode
/.idea

oclif.lock
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --concurrent false
5 changes: 5 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.json": ["prettier --write"],
"*.md": ["prettier --write"],
"+(src|test)/**/*.+(ts|js)": ["eslint --fix", "prettier --write"]
}
13 changes: 4 additions & 9 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"recursive": true,
"reporter": "spec",
"require": [
"test/helpers/init.js",
"ts-node/register",
"source-map-support/register"
],
"require": ["ts-node/register"],
"timeout": 0,
"watch-extensions": [
"ts"
]
"watch-files": ["test/**/*.ts", "src/**/*.ts"],
"watch-extensions": ["ts"],
"node-option": ["loader=ts-node/esm"]
}

1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@oclif/prettier-config"
Loading

0 comments on commit be87bf6

Please sign in to comment.