Skip to content

Commit acee6e1

Browse files
authored
fix: fix ESM and web polyfills issue (#201)
1 parent 0eb3f18 commit acee6e1

File tree

8 files changed

+17
-13
lines changed

8 files changed

+17
-13
lines changed

libs/hooks/open-telemetry/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@openfeature/open-telemetry-hook",
33
"version": "5.1.1",
4-
"type": "commonjs",
54
"repository": {
65
"type": "git",
76
"url": "https://github.com/open-feature/js-sdk-contrib.git",

libs/hooks/open-telemetry/project.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"projectType": "library",
55
"targets": {
66
"package": {
7-
"executor": "@nrwl/web:rollup",
7+
"executor": "@nrwl/rollup:rollup",
88
"outputs": [
99
"{options.outputPath}"
1010
],
@@ -13,7 +13,9 @@
1313
"outputPath": "dist/libs/hooks/open-telemetry",
1414
"entryFile": "libs/hooks/open-telemetry/src/index.ts",
1515
"tsConfig": "libs/hooks/open-telemetry/tsconfig.lib.json",
16-
"compiler": "babel",
16+
"compiler": "tsc",
17+
"skipTypeField": true,
18+
"generateExportsField": true,
1719
"umdName": "OpenTelemetry",
1820
"external": [
1921
"typescript"

libs/providers/flagd-web/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@openfeature/flagd-web-provider",
33
"version": "0.1.2",
4-
"type": "commonjs",
54
"scripts": {
65
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
76
"current-version": "echo $npm_package_version"

libs/providers/flagd/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@openfeature/flagd-provider",
33
"version": "0.7.2",
4-
"type": "commonjs",
54
"scripts": {
65
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
76
"current-version": "echo $npm_package_version"

libs/providers/flagd/project.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@
5757
]
5858
},
5959
"package": {
60-
"executor": "@nrwl/web:rollup",
60+
"executor": "@nrwl/rollup:rollup",
6161
"outputs": ["{options.outputPath}"],
6262
"options": {
6363
"project": "libs/providers/flagd/package.json",
6464
"outputPath": "dist/libs/providers/flagd",
6565
"entryFile": "libs/providers/flagd/src/index.ts",
6666
"tsConfig": "libs/providers/flagd/tsconfig.lib.json",
67-
"compiler": "babel",
67+
"compiler": "tsc",
68+
"skipTypeField": true,
69+
"generateExportsField": true,
6870
"buildableProjectDepsInPackageJsonType": "dependencies",
6971
"umdName": "flagd",
7072
"external": ["typescript"],

libs/providers/go-feature-flag/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "@openfeature/go-feature-flag-provider",
33
"version": "0.5.2",
4-
"type": "commonjs",
54
"scripts": {
65
"publish-if-not-exists": "cp $NPM_CONFIG_USERCONFIG .npmrc && if [ \"$(npm show $npm_package_name@$npm_package_version version)\" = \"$(npm run current-version -s)\" ]; then echo 'already published, skipping'; else npm publish --access public; fi",
76
"current-version": "echo $npm_package_version"

libs/providers/go-feature-flag/project.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
},
4040
"package": {
41-
"executor": "@nrwl/web:rollup",
41+
"executor": "@nrwl/rollup:rollup",
4242
"outputs": [
4343
"{options.outputPath}"
4444
],
@@ -47,7 +47,9 @@
4747
"outputPath": "dist/libs/providers/go-feature-flag",
4848
"entryFile": "libs/providers/go-feature-flag/src/index.ts",
4949
"tsConfig": "libs/providers/go-feature-flag/tsconfig.lib.json",
50-
"compiler": "babel",
50+
"compiler": "tsc",
51+
"skipTypeField": true,
52+
"generateExportsField": true,
5153
"buildableProjectDepsInPackageJsonType": "dependencies",
5254
"umdName": "go-feature-flag",
5355
"external": [

tools/generators/open-feature/index.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,17 @@ function normalizeOptions(tree: Tree, schema: SchemaOptions) {
120120
function updateProject(tree: Tree, projectRoot: string, umdName: string) {
121121
updateJson(tree, joinPathFragments(projectRoot, 'project.json'), (json) => {
122122
json.targets['package'] = {
123-
executor: '@nrwl/web:rollup',
123+
executor: '@nrwl/rollup:rollup',
124124
outputs: ['{options.outputPath}'],
125125
options: {
126126
project: `${projectRoot}/package.json`,
127127
outputPath: `dist/${projectRoot}`,
128128
entryFile: `${projectRoot}/src/index.ts`,
129129
tsConfig: `${projectRoot}/tsconfig.lib.json`,
130-
buildableProjectDepsInPackageJsonType: "dependencies",
131-
compiler: 'babel',
130+
buildableProjectDepsInPackageJsonType: 'dependencies',
131+
compiler: 'tsc',
132+
skipTypeField: true,
133+
generateExportsField: true,
132134
umdName,
133135
external: ['typescript'],
134136
format: ['cjs', 'esm'],

0 commit comments

Comments
 (0)