Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
"description": "Feature Management Application Insights Plugin for Browser provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
"main": "./dist/esm/index.js",
"type": "module",
"types": "types/index.d.ts",
"types": "./dist/types/index.d.ts",
"files": [
"dist/",
"types/",
"LICENSE",
"README.md"
],
"scripts": {
"build": "npm run link && npm run clean && rollup --config",
"clean": "rimraf dist types",
"clean": "rimraf dist",
"link": "npm link ../feature-management",
"dev": "rollup --config --watch",
"lint": "eslint src/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,14 @@ export default [
],
plugins: [
typescript({
compilerOptions: {
"lib": [
"DOM",
"WebWorker",
"ESNext"
],
"skipDefaultLibCheck": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"strictNullChecks": true,
"strictFunctionTypes": true,
"sourceMap": true,
"inlineSources": true
}
tsconfig: "./tsconfig.json",
})
],
},
{
external: ["@microsoft/feature-management"],
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "esm" }],
output: [{ file: "dist/types/index.d.ts", format: "esm" }],
plugins: [dts()],
}
];
15 changes: 10 additions & 5 deletions src/feature-management-applicationinsights-browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"compilerOptions": {
// Include ES2022 (modern JS), ESNext (future features), DOM and web worker APIs for browser support.
"lib": [
"DOM",
"WebWorker",
"ESNext",
"ES2022"
],
"skipDefaultLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
// Generate modern JavaScript syntax compatible with modern browsers.
"target": "ES2022",

// Use Node-style resolution to locate imports
"moduleResolution": "Node",

// Ensure strict type-checking
"strictNullChecks": true,
"strictFunctionTypes": true,
"skipDefaultLibCheck": true,

// Generate source maps and inline original TypeScript sources for debugging.
"sourceMap": true,
"inlineSources": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"exclude": [
"node_modules",
Expand Down
7 changes: 3 additions & 4 deletions src/feature-management-applicationinsights-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@
"description": "Feature Management Application Insights Plugin for Node.js provides a solution for sending feature flag evaluation events produced by the Feature Management library.",
"files": [
"dist/",
"types/",
"LICENSE",
"README.md"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"scripts": {
"build": "npm run link && npm run clean && rollup --config",
"clean": "rimraf dist types",
"clean": "rimraf dist",
"link": "npm link ../feature-management",
"dev": "rollup --config --watch",
"lint": "eslint src/",
Expand Down
18 changes: 2 additions & 16 deletions src/feature-management-applicationinsights-node/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,14 @@ export default [
],
plugins: [
typescript({
compilerOptions: {
"lib": [
"DOM",
"WebWorker",
"ESNext"
],
"skipDefaultLibCheck": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"strictNullChecks": true,
"strictFunctionTypes": true,
"sourceMap": true,
"inlineSources": true
}
tsconfig: "./tsconfig.json",
})
],
},
{
external: ["@microsoft/feature-management"],
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "esm" }],
output: [{ file: "dist/types/index.d.ts", format: "esm" }],
plugins: [dts()],
}
];
20 changes: 14 additions & 6 deletions src/feature-management-applicationinsights-node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
{
"compilerOptions": {
// Include ES2022 (modern JS), ESNext (future features) and web worker APIs.
"lib": [
"DOM",
"WebWorker",
"ESNext",
"ES2022"
],
"skipDefaultLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
// Generate modern JavaScript syntax compatible with Node 18+.
"target": "ES2022",

// Use Node-style resolution to locate imports
"moduleResolution": "Node",

// Allow default imports from CommonJS modules.
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,

// Ensure strict type-checking
"strictNullChecks": true,
"strictFunctionTypes": true,
"skipDefaultLibCheck": true,

// Generate source maps and inline original TypeScript sources for debugging.
"sourceMap": true,
"inlineSources": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"exclude": [
"node_modules",
Expand Down
7 changes: 3 additions & 4 deletions src/feature-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
"description": "Feature Management is a library for enabling/disabling features at runtime. Developers can use feature flags in simple use cases like conditional statement to more advanced scenarios like conditionally adding routes.",
"files": [
"dist/",
"types/",
"LICENSE",
"README.md"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
Expand All @@ -26,7 +25,7 @@
"build-test": "npm run build-test-esm && npm run build-test-cjs",
"build-test-esm": "tsc -p ./tsconfig.test.esm.json && cpy esm-package.json out/esm --rename=package.json",
"build-test-cjs": "tsc -p ./tsconfig.test.cjs.json && cpy cjs-package.json out/commonjs --rename=package.json",
"clean": "rimraf dist out types",
"clean": "rimraf dist out",
"dev": "rollup --config --watch",
"lint": "eslint src/ test/ --ignore-pattern test/browser/testcases.js",
"fix-lint": "eslint src/ test/ --fix --ignore-pattern test/browser/testcases.js",
Expand Down
25 changes: 5 additions & 20 deletions src/feature-management/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import dts from "rollup-plugin-dts";

export default [
{
external: ["crypto"],
external: [
"crypto"
],
input: "src/index.ts",
output: [
{
Expand All @@ -28,30 +30,13 @@ export default [
],
plugins: [
typescript({
compilerOptions: {
"lib": [
"DOM",
"WebWorker",
"ESNext"
],
"skipDefaultLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2022",
"strictNullChecks": true,
"strictFunctionTypes": true,
"sourceMap": true,
"inlineSources": true
},
"exclude": [
"test/**/*"
]
tsconfig: "./tsconfig.json",
})
],
},
{
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "esm" }],
output: [{ file: "dist/types/index.d.ts", format: "esm" }],
plugins: [dts()],
},
];
18 changes: 14 additions & 4 deletions src/feature-management/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
{
"compilerOptions": {
// Include ES2022 (modern JS), ESNext (future features), DOM and web worker APIs for browser support.
"lib": [
"DOM",
"WebWorker",
"ESNext",
"ES2022"
],
"skipDefaultLibCheck": true,
"moduleResolution": "Node",
// Generate modern JavaScript syntax compatible with Node 18+ and modern browsers.
"target": "ES2022",

// Use Node-style resolution to locate imports
"moduleResolution": "Node",

// Allow default imports from CommonJS modules.
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,

// Ensure strict type-checking
"strictNullChecks": true,
"strictFunctionTypes": true,
"skipDefaultLibCheck": true,

// Generate source maps and inline original TypeScript sources for debugging.
"sourceMap": true,
"inlineSources": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
"exclude": [
"node_modules",
Expand Down