Skip to content

Commit dbc2016

Browse files
authored
build: upgrade to esm
1 parent 94d9442 commit dbc2016

File tree

26 files changed

+1617
-1250
lines changed

26 files changed

+1617
-1250
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.cjs/
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module.exports = {
22
extends: ['eslint-config-salesforce-typescript', 'plugin:sf-plugin/recommended'],
3-
root: true,
43
};

.github/workflows/onPullRequest.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ jobs:
2727
- name: Install Salesforce CLI
2828
run: npm install @salesforce/cli --global
2929

30+
- name: Install packages
31+
run: yarn install
32+
33+
- name: Compile
34+
run: yarn run compile
35+
3036
- name: Install plugin
3137
run: |
3238
sf plugins link .
3339
sf plugins
3440
35-
- name: Unit test
36-
run: yarn test:only
41+
- name: Unit tests
42+
run: yarn run test:only

.mocharc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"require": "ts-node/register,source-map-support/register",
2+
"require": ["ts-node/register"],
33
"watch-extensions": "ts",
44
"recursive": true,
55
"reporter": "spec",
6-
"timeout": 600000
6+
"timeout": 5000,
7+
"node-option": ["loader=ts-node/esm"]
78
}

.nycrc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"check-coverage": true,
3-
"lines": 75,
4-
"statements": 75,
5-
"functions": 75,
6-
"branches": 50
2+
"nyc": {
3+
"extends": "@salesforce/dev-config/nyc"
4+
}
75
}

.sfdevrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM salesforce/cli:latest-full
22
WORKDIR /plugin
33
COPY . .
4+
RUN npm run compile
45
RUN sf plugins link .

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ The process is highly manual, and forgetting to track certain fields often cause
99

1010
The command, which can be executed locally or inserted into a CI/CD pipeline, verifies the required fields from the recipes and marks them in the environment within seconds.
1111

12+
> [!NOTE]
13+
> Despite the warning message indicating partial support for ESM plugins in OCLIF, rest assured that the plugins will function as expected.
14+
1215
## Install
1316

1417
Run the following command (if you are still using the old CLI, relace `sf` with `sfdx` or [move to the new CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm)):

bin/dev

Lines changed: 0 additions & 21 deletions
This file was deleted.

bin/dev.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@echo off
2-
set NODE_ENV=development
3-
node "%~dp0\dev" %*
2+
3+
node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*

0 commit comments

Comments
 (0)