fix: fix ESM and web polyfills issue (#201)
This commit is contained in:
parent
0eb3f1802d
commit
acee6e1817
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@openfeature/open-telemetry-hook",
|
"name": "@openfeature/open-telemetry-hook",
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"type": "commonjs",
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/open-feature/js-sdk-contrib.git",
|
"url": "https://github.com/open-feature/js-sdk-contrib.git",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"targets": {
|
"targets": {
|
||||||
"package": {
|
"package": {
|
||||||
"executor": "@nrwl/web:rollup",
|
"executor": "@nrwl/rollup:rollup",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
"{options.outputPath}"
|
"{options.outputPath}"
|
||||||
],
|
],
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
"outputPath": "dist/libs/hooks/open-telemetry",
|
"outputPath": "dist/libs/hooks/open-telemetry",
|
||||||
"entryFile": "libs/hooks/open-telemetry/src/index.ts",
|
"entryFile": "libs/hooks/open-telemetry/src/index.ts",
|
||||||
"tsConfig": "libs/hooks/open-telemetry/tsconfig.lib.json",
|
"tsConfig": "libs/hooks/open-telemetry/tsconfig.lib.json",
|
||||||
"compiler": "babel",
|
"compiler": "tsc",
|
||||||
|
"skipTypeField": true,
|
||||||
|
"generateExportsField": true,
|
||||||
"umdName": "OpenTelemetry",
|
"umdName": "OpenTelemetry",
|
||||||
"external": [
|
"external": [
|
||||||
"typescript"
|
"typescript"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@openfeature/flagd-web-provider",
|
"name": "@openfeature/flagd-web-provider",
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"type": "commonjs",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"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",
|
"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",
|
||||||
"current-version": "echo $npm_package_version"
|
"current-version": "echo $npm_package_version"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@openfeature/flagd-provider",
|
"name": "@openfeature/flagd-provider",
|
||||||
"version": "0.7.2",
|
"version": "0.7.2",
|
||||||
"type": "commonjs",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"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",
|
"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",
|
||||||
"current-version": "echo $npm_package_version"
|
"current-version": "echo $npm_package_version"
|
||||||
|
|
|
||||||
|
|
@ -57,14 +57,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"executor": "@nrwl/web:rollup",
|
"executor": "@nrwl/rollup:rollup",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"project": "libs/providers/flagd/package.json",
|
"project": "libs/providers/flagd/package.json",
|
||||||
"outputPath": "dist/libs/providers/flagd",
|
"outputPath": "dist/libs/providers/flagd",
|
||||||
"entryFile": "libs/providers/flagd/src/index.ts",
|
"entryFile": "libs/providers/flagd/src/index.ts",
|
||||||
"tsConfig": "libs/providers/flagd/tsconfig.lib.json",
|
"tsConfig": "libs/providers/flagd/tsconfig.lib.json",
|
||||||
"compiler": "babel",
|
"compiler": "tsc",
|
||||||
|
"skipTypeField": true,
|
||||||
|
"generateExportsField": true,
|
||||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||||
"umdName": "flagd",
|
"umdName": "flagd",
|
||||||
"external": ["typescript"],
|
"external": ["typescript"],
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@openfeature/go-feature-flag-provider",
|
"name": "@openfeature/go-feature-flag-provider",
|
||||||
"version": "0.5.2",
|
"version": "0.5.2",
|
||||||
"type": "commonjs",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"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",
|
"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",
|
||||||
"current-version": "echo $npm_package_version"
|
"current-version": "echo $npm_package_version"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"executor": "@nrwl/web:rollup",
|
"executor": "@nrwl/rollup:rollup",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
"{options.outputPath}"
|
"{options.outputPath}"
|
||||||
],
|
],
|
||||||
|
|
@ -47,7 +47,9 @@
|
||||||
"outputPath": "dist/libs/providers/go-feature-flag",
|
"outputPath": "dist/libs/providers/go-feature-flag",
|
||||||
"entryFile": "libs/providers/go-feature-flag/src/index.ts",
|
"entryFile": "libs/providers/go-feature-flag/src/index.ts",
|
||||||
"tsConfig": "libs/providers/go-feature-flag/tsconfig.lib.json",
|
"tsConfig": "libs/providers/go-feature-flag/tsconfig.lib.json",
|
||||||
"compiler": "babel",
|
"compiler": "tsc",
|
||||||
|
"skipTypeField": true,
|
||||||
|
"generateExportsField": true,
|
||||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||||
"umdName": "go-feature-flag",
|
"umdName": "go-feature-flag",
|
||||||
"external": [
|
"external": [
|
||||||
|
|
|
||||||
|
|
@ -120,15 +120,17 @@ function normalizeOptions(tree: Tree, schema: SchemaOptions) {
|
||||||
function updateProject(tree: Tree, projectRoot: string, umdName: string) {
|
function updateProject(tree: Tree, projectRoot: string, umdName: string) {
|
||||||
updateJson(tree, joinPathFragments(projectRoot, 'project.json'), (json) => {
|
updateJson(tree, joinPathFragments(projectRoot, 'project.json'), (json) => {
|
||||||
json.targets['package'] = {
|
json.targets['package'] = {
|
||||||
executor: '@nrwl/web:rollup',
|
executor: '@nrwl/rollup:rollup',
|
||||||
outputs: ['{options.outputPath}'],
|
outputs: ['{options.outputPath}'],
|
||||||
options: {
|
options: {
|
||||||
project: `${projectRoot}/package.json`,
|
project: `${projectRoot}/package.json`,
|
||||||
outputPath: `dist/${projectRoot}`,
|
outputPath: `dist/${projectRoot}`,
|
||||||
entryFile: `${projectRoot}/src/index.ts`,
|
entryFile: `${projectRoot}/src/index.ts`,
|
||||||
tsConfig: `${projectRoot}/tsconfig.lib.json`,
|
tsConfig: `${projectRoot}/tsconfig.lib.json`,
|
||||||
buildableProjectDepsInPackageJsonType: "dependencies",
|
buildableProjectDepsInPackageJsonType: 'dependencies',
|
||||||
compiler: 'babel',
|
compiler: 'tsc',
|
||||||
|
skipTypeField: true,
|
||||||
|
generateExportsField: true,
|
||||||
umdName,
|
umdName,
|
||||||
external: ['typescript'],
|
external: ['typescript'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue