Skip to content

Commit 3a3bdc8

Browse files
author
Pavel Glac
committed
network isolation
1 parent 2f7ef7e commit 3a3bdc8

8 files changed

Lines changed: 6263 additions & 3697 deletions

File tree

.azure-devops/release.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ variables:
77
value: production,externalfacing
88
- name: serviceTreeID
99
value: 21f0b890-e3a8-4c0b-b9e7-2f764f8b799c
10+
- name: adoMirrorNpmFeedBaseUrl
11+
value: https://pkgs.dev.azure.com/DomoreexpGithub/Github_Pipelines/_packaging/github-npm-mirror/npm/registry/
1012

1113
resources:
1214
repositories:
@@ -54,11 +56,34 @@ extends:
5456
- task: NodeTool@0
5557
displayName: "Installing node"
5658
inputs:
57-
versionSpec: "16"
58-
- script: yarn --frozen-lockfile
59+
versionSpec: "18"
60+
- script: |
61+
cat <<'EOF' > "$(Agent.TempDirectory)/npm-mirror.npmrc"
62+
always-auth=true
63+
registry=$(adoMirrorNpmFeedBaseUrl)
64+
EOF
65+
displayName: Create temporary .npmrc for mirror feed
66+
- task: npmAuthenticate@0
67+
inputs:
68+
workingFile: "$(Agent.TempDirectory)/npm-mirror.npmrc"
69+
- script: |
70+
TOKEN=$(grep '_authToken' "$(Agent.TempDirectory)/npm-mirror.npmrc" | head -1 | cut -d'=' -f2)
71+
echo "##vso[task.setvariable variable=NPM_TOKEN;issecret=true]$TOKEN"
72+
displayName: Extract token from .npmrc
73+
- script: |
74+
yarn config set npmAlwaysAuth true
75+
yarn config set npmRegistryServer $(adoMirrorNpmFeedBaseUrl)
76+
displayName: Configure yarn for ADO npm feed
77+
- script: yarn install --immutable
5978
displayName: yarn
79+
env:
80+
YARN_NPM_AUTH_TOKEN: $(NPM_TOKEN)
81+
NPM_CONFIG_USERCONFIG: $(Agent.TempDirectory)/npm-mirror.npmrc
6082
- script: yarn build && yarn test:ci
6183
displayName: build and test [test]
84+
env:
85+
YARN_NPM_AUTH_TOKEN: $(NPM_TOKEN)
86+
NPM_CONFIG_USERCONFIG: $(Agent.TempDirectory)/npm-mirror.npmrc
6287

6388
- script: |
6489
mkdir -p $(System.DefaultWorkingDirectory)/packages

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
# Sets up Node and an .npmrc file. This is the official Github supported way to set up node.
2727
- uses: actions/setup-node@v4
2828
with:
29-
node-version: "16"
29+
node-version: "18"
3030
registry-url: "https://registry.npmjs.org"
3131
cache: "yarn"
3232
always-auth: "true"
3333

3434
- name: Install packages
35-
run: yarn --frozen-lockfile
35+
run: yarn install --immutable
3636

3737
- name: Set Firefox Env Variable
3838
run: export FIREFOX_BIN=$(which firefox)

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
*.user
66
/ObjectStoreProviderTestsPack.js
77
/dist
8+
9+
# Yarn Berry install state cache
10+
.yarn/install-state.gz

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/ObjectStoreProviderTestsPack.js
77
/dist
88
/.config
9+
/.yarn

.yarn/releases/yarn-4.17.0.cjs

Lines changed: 944 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
approvedGitRepositories:
2+
- "**"
3+
4+
enableScripts: true
5+
6+
nodeLinker: node-modules
7+
8+
npmMinimalAgeGate: 0
9+
10+
yarnPath: .yarn/releases/yarn-4.17.0.cjs

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"ts-loader": "^9.2.3",
6767
"ts-node": "^10.0.0",
6868
"typescript": "^4.3.4",
69-
"webpack": "^5.39.1",
69+
"webpack": "^5.108.4",
7070
"webpack-cli": "^4.7.2"
7171
},
7272
"repository": {
@@ -89,5 +89,6 @@
8989
"react native"
9090
],
9191
"license": "MIT",
92-
"homepage": "https://github.com/microsoft/objectstoreprovider#readme"
92+
"homepage": "https://github.com/microsoft/objectstoreprovider#readme",
93+
"packageManager": "yarn@4.17.0"
9394
}

0 commit comments

Comments
 (0)