Skip to content

Commit 105a8bd

Browse files
committed
BREAKING CHANGE: new API to import this module
This should improve the developer experience as described here: https://basarat.gitbook.io/typescript/main-1/defaultisbad - use named export instead of default export - make the workaround the primary entry point of this module Please migrate your code as follows: ```diff - import listStandardValueSets from '@mdapi-issues/listmetadata-standardvalueset/lib/workaround' + import { listStandardValueSets } from '@mdapi-issues/listmetadata-standardvalueset' ```
1 parent 0e0c967 commit 105a8bd

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"node": ">=8.0.0"
2929
},
3030
"files": [
31-
"/lib"
31+
"./lib"
3232
],
3333
"homepage": "https://github.com/mdapi-issues/listmetadata-standardvalueset",
3434
"keywords": [
@@ -38,7 +38,7 @@
3838
"MWE"
3939
],
4040
"license": "MIT",
41-
"main": "/lib/workaround.js",
41+
"main": "./lib/workaround.js",
4242
"publishConfig": {
4343
"access": "public"
4444
},

src/workaround.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Connection, FileProperties } from 'jsforce';
22
import MAPPING from './mapping';
33

4-
export default async function listStandardValueSets(
4+
export async function listStandardValueSets(
55
conn: Connection
66
): Promise<Array<FileProperties>> {
77
const availableStandardValueSetNames = [];

test/issue.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Org } from '@salesforce/core';
22
import { expect } from 'chai';
3-
import listStandardValueSets from './issue';
3+
import { listStandardValueSets } from './issue';
44

55
describe('listMetadata', function () {
66
this.slow(5000);

test/issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Connection, FileProperties } from 'jsforce';
22

3-
export default async function listStandardValueSets(
3+
export async function listStandardValueSets(
44
conn: Connection
55
): Promise<Array<FileProperties>> {
66
const fileProperties = await conn.metadata.list({ type: 'StandardValueSet' });

test/workaround.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Org } from '@salesforce/core';
22
import { expect } from 'chai';
3-
import listStandardValueSets from '../src/workaround';
3+
import { listStandardValueSets } from '../src/workaround';
44

55
describe('workaround', function () {
66
this.slow(5000);

0 commit comments

Comments
 (0)