Skip to content

Commit 6e43a2b

Browse files
authored
Prep for v4 GA πŸŽ‰ (#148)
1 parent 34c305a commit 6e43a2b

File tree

9 files changed

+34
-482
lines changed

9 files changed

+34
-482
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing
2+
3+
- Clone the repository locally and open in VS Code
4+
- Run "Extensions: Show Recommended Extensions" from the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and install all extensions listed under "Workspace Recommendations"
5+
- Run `npm install`
6+
- Run `npm run build`
7+
- Run `npm link`
8+
- Create or open a local function app to test with
9+
- In the local function app:
10+
- Run `npm link @azure/functions`. This will point your app to the local repository for the `@azure/functions` package
11+
- Add the following settings to your "local.settings.json" file or configure them directly as environment variables
12+
- `languageWorkers__node__arguments`: `--inspect`
13+
> πŸ’‘ Tip: Set `logging__logLevel__Worker` to `debug` if you want to view worker-specific logs in the output of `func start`
14+
- Start the app (i.e. run `func start` or press <kbd>F5</kbd>)
15+
- Back in the framework repository, press <kbd>F5</kbd> and select the process for your running function app
16+
- Before you submit a PR, run `npm test` and fix any issues. If you want to debug the tests, switch your [launch profile](https://code.visualstudio.com/docs/editor/debugging) in VS Code to "Launch Unit Tests" and press <kbd>F5</kbd>.
17+
18+
## Code of Conduct
19+
20+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
21+
22+
## Contributing to type definitions
23+
24+
The type definitions are located in the `types` folder. Please make sure to update the tests in `./test/types/index.test.ts` as well.

β€ŽNOTICE.htmlβ€Ž

Lines changed: 0 additions & 446 deletions
This file was deleted.

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
|Branch|Status|Support level|Node.js Versions|
44
|---|---|---|---|
5-
|v4.x|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v4.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v4.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v4.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v4.x)|Preview|20 (Preview), 18|
6-
|v3.x (default)|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v3.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v3.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v3.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v3.x)|GA (Recommended)|20 (Preview), 18, 16, 14|
5+
|v4.x (default)|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v4.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v4.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v4.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v4.x)|GA (Recommended)|20 (Preview), 18|
6+
|v3.x|[![Build Status](https://img.shields.io/azure-devops/build/azfunc/Azure%2520Functions/145/v3.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=145&branchName=v3.x) [![Test Status](https://img.shields.io/azure-devops/tests/azfunc/Azure%2520Functions/146/v3.x?compact_message)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=146&branchName=v3.x)|GA|20 (Preview), 18, 16, 14|
77

88
## Install
99

1010
```bash
11-
npm install @azure/functions@preview
11+
npm install @azure/functions
1212
```
1313

1414
## Documentation
@@ -20,11 +20,11 @@ npm install @azure/functions@preview
2020

2121
## Considerations
2222

23-
- During preview, the v4 model requires you to set the app setting `AzureWebJobsFeatureFlags` to `EnableWorkerIndexing`. For more information, see [Enable v4 programming model](https://learn.microsoft.com/azure/azure-functions/functions-reference-node?pivots=nodejs-model-v4#enable-v4-programming-model).
2423
- The Node.js "programming model" shouldn't be confused with the Azure Functions "runtime".
2524
- _**Programming model**_: Defines how you author your code and is specific to JavaScript and TypeScript.
2625
- _**Runtime**_: Defines underlying behavior of Azure Functions and is shared across all languages.
2726
- The programming model version is strictly tied to the version of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package, and is versioned independently of the [runtime](https://learn.microsoft.com/azure/azure-functions/functions-versions?pivots=programming-language-javascript). Both the runtime and the programming model use "4" as their latest major version, but that is purely a coincidence.
27+
- You can't mix the v3 and v4 programming models in the same function app. As soon as you register one v4 function in your app, any v3 functions registered in _function.json_ files are ignored.
2828

2929
## Usage
3030

@@ -65,28 +65,3 @@ app.http('httpTrigger1', {
6565
}
6666
});
6767
```
68-
69-
## Contributing
70-
71-
- Clone the repository locally and open in VS Code
72-
- Run "Extensions: Show Recommended Extensions" from the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and install all extensions listed under "Workspace Recommendations"
73-
- Run `npm install`
74-
- Run `npm run build`
75-
- Run `npm link`
76-
- Create or open a local function app to test with
77-
- In the local function app:
78-
- Run `npm link @azure/functions`. This will point your app to the local repository for the `@azure/functions` package
79-
- Add the following settings to your "local.settings.json" file or configure them directly as environment variables
80-
- `languageWorkers__node__arguments`: `--inspect`
81-
> πŸ’‘ Tip: Set `logging__logLevel__Worker` to `debug` if you want to view worker-specific logs in the output of `func start`
82-
- Start the app (i.e. run `func start` or press <kbd>F5</kbd>)
83-
- Back in the framework repository, press <kbd>F5</kbd> and select the process for your running function app
84-
- Before you submit a PR, run `npm test` and fix any issues. If you want to debug the tests, switch your [launch profile](https://code.visualstudio.com/docs/editor/debugging) in VS Code to "Launch Unit Tests" and press <kbd>F5</kbd>.
85-
86-
### Code of Conduct
87-
88-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
89-
90-
### Contributing to type definitions
91-
92-
The type definitions are located in the `types` folder. Please make sure to update the tests in `./test/types/index.test.ts` as well.

β€Žazure-pipelines/build.ymlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
src/**
4141
types/**
4242
LICENSE
43-
NOTICE.html
4443
package.json
4544
README.md
4645
targetFolder: '$(Build.ArtifactStagingDirectory)'

β€Žazure-pipelines/release.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ parameters:
22
- name: NpmPublishTag
33
displayName: 'Tag'
44
type: string
5-
default: 'preview'
5+
default: 'latest'
66
- name: NpmPublishDryRun
77
displayName: 'Dry Run'
88
type: boolean

β€Žpackage-lock.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure/functions",
3-
"version": "4.0.0-alpha.13",
3+
"version": "4.0.0",
44
"description": "Microsoft Azure Functions NodeJS Framework",
55
"keywords": [
66
"azure",
@@ -26,7 +26,6 @@
2626
"types/",
2727
"LICENSE",
2828
"README.md",
29-
"NOTICE.html",
3029
"_manifest"
3130
],
3231
"engines": {

β€Žscripts/validateRelease.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function validateRelease(publishTag: string, dropPath: string): void {
3636
expectedFormat = 'x.x.x-alpha.x';
3737
break;
3838
case 'latest':
39+
case 'legacy':
3940
regex = /^[0-9]+\.[0-9]+\.[0-9]+$/;
4041
expectedFormat = 'x.x.x';
4142
break;

β€Žsrc/constants.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
export const version = '4.0.0-alpha.13';
4+
export const version = '4.0.0';
55

66
export const returnBindingKey = '$return';

0 commit comments

Comments
Β (0)