Skip to content

Commit 6aae3f5

Browse files
committed
Bref v3
1 parent 205097b commit 6aae3f5

9 files changed

Lines changed: 22 additions & 22 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
99
liberapay: # Replace with a single Liberapay username
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
12-
custom: 'https://bref.sh/#enterprise' # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
12+
custom: 'https://bref.sh/support' # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/aws/github-role.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Resources:
1515
- Effect: Allow
1616
Action: sts:AssumeRoleWithWebIdentity
1717
Principal:
18-
Federated: arn:aws:iam::534081306603:oidc-provider/token.actions.githubusercontent.com
18+
Federated: arn:aws:iam::873528684822:oidc-provider/token.actions.githubusercontent.com
1919
Condition:
2020
StringLike:
2121
token.actions.githubusercontent.com:sub: !Sub repo:${FullRepoName}:*

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set AWS credentials
2828
uses: aws-actions/configure-aws-credentials@v1
2929
with:
30-
role-to-assume: arn:aws:iam::534081306603:role/bref-layer-js-github-actions
30+
role-to-assume: arn:aws:iam::873528684822:role/bref-layer-js-github-actions
3131
role-session-name: bref-layer-js-github-actions
3232
aws-region: us-east-1
3333

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, '2.x' ]
66
pull_request:
77
branches: ['*']
88

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ npm install @bref.sh/layers
1414

1515
## Version compatibility with Bref
1616

17-
This package is compatible with Bref 2.0 and above.
17+
This package is compatible with Bref 3.0 and above.
1818

1919
This NPM package and Bref are compatible as long as they have the same **major** version. For example:
2020

2121
- v**2**.x.y of this package is compatible with v**2**.z.w of Bref
2222
- v**3**.x.y of this package is **NOT** compatible with v**2**.z.w of Bref
23-
- v**2**.x.y of this package is **NOT** compatible with v**1**.z.w of Bref
23+
- v**2**.x.y of this package is **NOT** compatible with v**3**.z.w of Bref
2424
- etc.
2525

2626
All minor and patch versions are not important. Only the major version matters. That means you can upgrade Bref separately from upgrading this package (though it's always good to stay on the latest versions).
@@ -42,10 +42,10 @@ Helpers to get a full ARN:
4242
import { functionLayerArn, fpmLayerArn, consoleLayerArn } from '@bref.sh/layers';
4343

4444
console.log(functionLayerArn(region, '8.2'));
45-
console.log(functionLayerArn(region, '8.1', 'arm'));
45+
console.log(functionLayerArn(region, '8.3', 'arm'));
4646

4747
console.log(fpmLayerArn(region, '8.2'));
48-
console.log(fpmLayerArn(region, '8.1', 'arm'));
48+
console.log(fpmLayerArn(region, '8.3', 'arm'));
4949

5050
console.log(consoleLayerArn(region));
5151
```

layers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function functionLayerArn(region, phpVersion, platform = 'x86') {
1717
if (!version) {
1818
throw new Error(`PHP version ${phpVersion} in ${region} is not supported`);
1919
}
20-
return `arn:aws:lambda:${region}:534081306603:layer:${layerName}:${version}`;
20+
return `arn:aws:lambda:${region}:873528684822:layer:${layerName}:${version}`;
2121
}
2222

2323
/**
@@ -36,7 +36,7 @@ function fpmLayerArn(region, phpVersion, platform = 'x86') {
3636
if (!version) {
3737
throw new Error(`PHP version ${phpVersion} in ${region} is not supported`);
3838
}
39-
return `arn:aws:lambda:${region}:534081306603:layer:${layerName}:${version}`;
39+
return `arn:aws:lambda:${region}:873528684822:layer:${layerName}:${version}`;
4040
}
4141

4242
/**
@@ -49,7 +49,7 @@ function consoleLayerArn(region) {
4949
if (!version) {
5050
throw new Error(`Console layer does not exist in region ${region}`);
5151
}
52-
return `arn:aws:lambda:${region}:534081306603:layer:console:${version}`;
52+
return `arn:aws:lambda:${region}:873528684822:layer:console:${version}`;
5353
}
5454

5555
module.exports = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bref.sh/layers",
3-
"version": "2.0.120",
3+
"version": "3.0.0",
44
"description": "Bref.sh AWS Lambda layers",
55
"repository": "brefphp/layers.js",
66
"license": "MIT",

scripts/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function listLayers(lambdaClient, region) {
6868

6969
for (const layerName of layerNames) {
7070
const response = await lambdaClient.send(new ListLayerVersionsCommand({
71-
LayerName: `arn:aws:lambda:${region}:534081306603:layer:${layerName}`,
71+
LayerName: `arn:aws:lambda:${region}:873528684822:layer:${layerName}`,
7272
MaxItems: 1,
7373
}));
7474
const versions = response.LayerVersions;

test/layers.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,29 @@ describe('layers', () => {
3333
});
3434

3535
test('functionLayerArn', () => {
36-
expect(functionLayerArn('us-east-1', '8.3')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:php-83:\d+/);
37-
expect(functionLayerArn('us-east-1', '8.3', 'arm')).matches(/arn:aws:lambda:eu-west-1:534081306603:layer:arm-php-83:\d+/);
38-
expect(functionLayerArn('us-east-1', '8.2')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:php-82:\d+/);
39-
expect(functionLayerArn('us-east-1', '8.1', 'arm')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:arm-php-81:\d+/);
36+
expect(functionLayerArn('us-east-1', '8.3')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:php-83:\d+/);
37+
expect(functionLayerArn('us-east-1', '8.3', 'arm')).matches(/arn:aws:lambda:eu-west-1:873528684822:layer:arm-php-83:\d+/);
38+
expect(functionLayerArn('us-east-1', '8.2')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:php-82:\d+/);
39+
expect(functionLayerArn('us-east-1', '8.1', 'arm')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:arm-php-81:\d+/);
4040

4141
expect(() => {
4242
functionLayerArn('us-east-1', '7.4', 'arm');
4343
}).toThrow('PHP version 7.4 in us-east-1 is not supported');
4444
});
4545

4646
test('fpmLayerArn', () => {
47-
expect(fpmLayerArn('us-east-1', '8.3')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:php-83-fpm:\d+/);
48-
expect(fpmLayerArn('us-east-1', '8.3', 'arm')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:arm-php-83-fpm:\d+/);
49-
expect(fpmLayerArn('us-east-1', '8.2')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:php-82-fpm:\d+/);
50-
expect(fpmLayerArn('us-east-1', '8.1', 'arm')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:arm-php-81-fpm:\d+/);
47+
expect(fpmLayerArn('us-east-1', '8.3')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:php-83-fpm:\d+/);
48+
expect(fpmLayerArn('us-east-1', '8.3', 'arm')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83-fpm:\d+/);
49+
expect(fpmLayerArn('us-east-1', '8.2')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:php-82-fpm:\d+/);
50+
expect(fpmLayerArn('us-east-1', '8.1', 'arm')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:arm-php-81-fpm:\d+/);
5151

5252
expect(() => {
5353
fpmLayerArn('us-east-1', '7.4', 'arm');
5454
}).toThrow('PHP version 7.4 in us-east-1 is not supported');
5555
});
5656

5757
test('consoleLayerArn', () => {
58-
expect(consoleLayerArn('us-east-1')).matches(/arn:aws:lambda:us-east-1:534081306603:layer:console:\d+/);
58+
expect(consoleLayerArn('us-east-1')).matches(/arn:aws:lambda:us-east-1:873528684822:layer:console:\d+/);
5959

6060
expect(() => {
6161
consoleLayerArn('us-east-99');

0 commit comments

Comments
 (0)