Skip to content

Add .gitattributes and normalize line endings #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# If there are abnormal line endings in any file, run "git add --renormalize <file_name>",
# review the changes, and commit them to fix the line endings.
* text=auto
56 changes: 28 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: AppConfiguration-JavaScriptProvider CI
on:
push:
branches: [ "main", "preview" ]
pull_request:
branches: [ "main", "preview" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
name: AppConfiguration-JavaScriptProvider CI

on:
push:
branches: [ "main", "preview" ]
pull_request:
branches: [ "main", "preview" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
26 changes: 13 additions & 13 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Support
## How to file issues and get help
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
issues before filing new issues to avoid duplicates. For new issues, file your bug or
feature request as a new Issue.
For help and questions about using this project, please ask a question in Stack Overflow with [azure-app-configuration](https://stackoverflow.com/questions/tagged/azure-app-configuration) tag.
## Microsoft Support Policy
Support for this project is limited to the resources listed above.
# Support

## How to file issues and get help

This project uses GitHub Issues to track bugs and feature requests. Please search the existing
issues before filing new issues to avoid duplicates. For new issues, file your bug or
feature request as a new Issue.

For help and questions about using this project, please ask a question in Stack Overflow with [azure-app-configuration](https://stackoverflow.com/questions/tagged/azure-app-configuration) tag.

## Microsoft Support Policy

Support for this project is limited to the resources listed above.
98 changes: 49 additions & 49 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
// rollup.config.js
import typescript from "@rollup/plugin-typescript";
import dts from "rollup-plugin-dts";
export default [
{
external: [
"@azure/app-configuration",
"@azure/keyvault-secrets",
"@azure/core-rest-pipeline",
"@azure/identity",
"crypto",
"dns/promises",
"@microsoft/feature-management"
],
input: "src/index.ts",
output: [
{
file: "dist/index.js",
format: "cjs",
sourcemap: true
},
],
plugins: [
typescript({
compilerOptions: {
"lib": [
"DOM",
"WebWorker",
"ESNext"
],
"skipDefaultLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2022",
"strictNullChecks": true,
"strictFunctionTypes": true,
"sourceMap": true,
"inlineSources": true
}
})
],
},
{
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "es" }],
plugins: [dts()],
},
];
// rollup.config.js
import typescript from "@rollup/plugin-typescript";
import dts from "rollup-plugin-dts";

export default [
{
external: [
"@azure/app-configuration",
"@azure/keyvault-secrets",
"@azure/core-rest-pipeline",
"@azure/identity",
"crypto",
"dns/promises",
"@microsoft/feature-management"
],
input: "src/index.ts",
output: [
{
file: "dist/index.js",
format: "cjs",
sourcemap: true
},
],
plugins: [
typescript({
compilerOptions: {
"lib": [
"DOM",
"WebWorker",
"ESNext"
],
"skipDefaultLibCheck": true,
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2022",
"strictNullChecks": true,
"strictFunctionTypes": true,
"sourceMap": true,
"inlineSources": true
}
})
],
},
{
input: "src/index.ts",
output: [{ file: "types/index.d.ts", format: "es" }],
plugins: [dts()],
},
];
94 changes: 47 additions & 47 deletions src/AzureAppConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { Disposable } from "./common/disposable.js";
/**
* Azure App Configuration provider.
*/
export type AzureAppConfiguration = {
/**
* API to trigger refresh operation.
*/
refresh(): Promise<void>;
/**
* API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags.
*
* @param listener - Callback function to be registered.
* @param thisArg - Optional. Value to use as `this` when executing callback.
*/
onRefresh(listener: () => any, thisArg?: any): Disposable;
} & IGettable & ReadonlyMap<string, any> & IConfigurationObject;
interface IConfigurationObject {
/**
* Construct configuration object based on Map-styled data structure and hierarchical keys.
* @param options - The options to control the conversion behavior.
*/
constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>;
}
export interface ConfigurationObjectConstructionOptions {
/**
* The separator to use when converting hierarchical keys to object properties.
* Supported values: '.', ',', ';', '-', '_', '__', '/', ':'.
* If separator is undefined, '.' will be used by default.
*/
separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":";
}
interface IGettable {
/**
* Get the value of a key-value from the Map-styled data structure.
* @param key - The key of the key-value to be retrieved.
*/
get<T>(key: string): T | undefined;
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { Disposable } from "./common/disposable.js";

/**
* Azure App Configuration provider.
*/
export type AzureAppConfiguration = {
/**
* API to trigger refresh operation.
*/
refresh(): Promise<void>;

/**
* API to register callback listeners, which will be called only when a refresh operation successfully updates key-values or feature flags.
*
* @param listener - Callback function to be registered.
* @param thisArg - Optional. Value to use as `this` when executing callback.
*/
onRefresh(listener: () => any, thisArg?: any): Disposable;
} & IGettable & ReadonlyMap<string, any> & IConfigurationObject;

interface IConfigurationObject {
/**
* Construct configuration object based on Map-styled data structure and hierarchical keys.
* @param options - The options to control the conversion behavior.
*/
constructConfigurationObject(options?: ConfigurationObjectConstructionOptions): Record<string, any>;
}

export interface ConfigurationObjectConstructionOptions {
/**
* The separator to use when converting hierarchical keys to object properties.
* Supported values: '.', ',', ';', '-', '_', '__', '/', ':'.
* If separator is undefined, '.' will be used by default.
*/
separator?: "." | "," | ";" | "-" | "_" | "__" | "/" | ":";
}

interface IGettable {
/**
* Get the value of a key-value from the Map-styled data structure.
* @param key - The key of the key-value to be retrieved.
*/
get<T>(key: string): T | undefined;
}
Loading