Skip to content

Commit

Permalink
Pin external deps to ensure explicit updates to lage bundle (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 authored Dec 21, 2023
1 parent 990dd48 commit 429047e
Show file tree
Hide file tree
Showing 20 changed files with 174 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: yarn lage depcheck

- name: Build, Test, Lint (Linux)
run: yarn lage transpile types build test lint bundle --concurrency 2 --verbose
run: yarn ci --concurrency 2 --verbose
env:
BACKFILL_CACHE_PROVIDER: ${{ secrets.backfill_cache_provider }}
BACKFILL_CACHE_PROVIDER_OPTIONS: ${{ secrets.backfill_cache_provider_options }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- run: yarn

- run: yarn lage transpile types build test lint bundle --concurrency 2 --verbose
- run: yarn ci --concurrency 2 --verbose

- name: Set git user
run: |
Expand Down
10 changes: 8 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@
"singleQuote": false,
"trailingComma": "es5",
"endOfLine": "auto",
"tabWidth": 2
}
"tabWidth": 2,
"overrides": [
{
"files": "*.json5",
"options": { "parser": "json" }
}
]
}
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false,
"typescript.tsdk": "node_modules/typescript/lib"
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"files.associations": {
"*.json5": "jsonc"
}
}
60 changes: 60 additions & 0 deletions change/change-401656a0-5b76-490e-ad34-be309bb01a9e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"changes": [
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/cache-github-actions",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/cache",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/cli",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/config",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/hasher",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "lage",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/reporters",
"email": "[email protected]",
"dependentChangeType": "patch"
},
{
"type": "patch",
"comment": "Pin external deps to ensure explicit updates to lage bundle",
"packageName": "@lage-run/target-graph",
"email": "[email protected]",
"dependentChangeType": "patch"
}
]
}
16 changes: 7 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,22 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.3.1",
"@docusaurus/preset-classic": "2.3.1",
"docusaurus-preset-shiki-twoslash": "^1.1.38",
"@cmfcmf/docusaurus-search-local": "^0.11.0",
"@docusaurus/core": "^2.3.1",
"@docusaurus/module-type-aliases": "^2.3.1",
"@docusaurus/preset-classic": "^2.3.1",
"@mdx-js/react": "^1.6.21",
"@stackblitz/sdk": "^1.8.0",
"@tsconfig/docusaurus": "1.0.7",
"clsx": "^1.1.1",
"docusaurus-preset-shiki-twoslash": "^1.1.38",
"identity-obj-proxy": "^3.0.0",
"mermaid": "^9.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-flow-renderer": "^10.3.7",
"react": "^17.0.1",
"tailwindcss": "^3.1.8"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.3.1",
"@tsconfig/docusaurus": "1.0.7",
"identity-obj-proxy": "3.0.0"
},
"browserslist": {
"production": [
">0.5%",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"watch": "lage transpile isolatedTypes --no-cache --verbose --unstable-watch",
"change": "beachball change",
"checkchange": "beachball check",
"ci": "lage transpile types build test lint bundle",
"release": "beachball publish -y --tag latest",
"test": "lage test --verbose",
"lint": "lage lint",
Expand All @@ -34,10 +35,10 @@
"@types/jest": "^29.5.1",
"@types/node": "^16.18.3",
"beachball": "^2.37.0",
"fast-glob": "^3.2.12",
"fast-glob": "3.3.1",
"gh-pages": "^4.0.0",
"husky": "^8.0.3",
"lage-npm": "npm:[email protected].6",
"lage-npm": "npm:[email protected].10",
"lint-staged": "^13.2.0",
"patch-package": "^6.5.1",
"prettier": "^2.8.6",
Expand Down
8 changes: 4 additions & 4 deletions packages/cache-github-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"lint": "monorepo-scripts lint"
},
"dependencies": {
"backfill-config": "^6.4.1",
"backfill-logger": "^5.2.1",
"workspace-tools": "^0.36.4",
"@actions/cache": "^3.0.4"
"backfill-config": "6.4.1",
"backfill-logger": "5.2.1",
"workspace-tools": "0.36.4",
"@actions/cache": "3.2.1"
},
"devDependencies": {
"@lage-run/monorepo-scripts": "*"
Expand Down
6 changes: 3 additions & 3 deletions packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"dependencies": {
"@lage-run/target-graph": "^0.8.8",
"@lage-run/logger": "^1.3.0",
"backfill-config": "^6.4.1",
"backfill-cache": "^5.7.1",
"backfill-logger": "^5.2.1",
"backfill-cache": "5.7.1",
"backfill-config": "6.4.1",
"backfill-logger": "5.2.1",
"glob-hasher": "^1.3.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"@lage-run/scheduler-types": "^0.3.12",
"@lage-run/target-graph": "^0.8.8",
"chokidar": "3.5.3",
"commander": "^9.4.0",
"execa": "^5.1.1",
"fast-glob": "^3.2.12",
"workspace-tools": "^0.36.4"
"commander": "9.5.0",
"execa": "5.1.1",
"fast-glob": "3.3.1",
"workspace-tools": "0.36.4"
},
"devDependencies": {
"@lage-run/monorepo-fixture": "*",
Expand Down
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"lint": "monorepo-scripts lint"
},
"dependencies": {
"backfill-config": "^6.4.1",
"@lage-run/logger": "^1.3.0",
"@lage-run/scheduler-types": "^0.3.12",
"@lage-run/target-graph": "^0.8.8",
"workspace-tools": "^0.36.4",
"cosmiconfig": "^7.0.0"
"backfill-config": "6.4.1",
"cosmiconfig": "7.1.0",
"workspace-tools": "0.36.4"
},
"devDependencies": {
"@lage-run/monorepo-scripts": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@lage-run/monorepo-scripts": "*",
"@lage-run/target-graph": "^0.8.8",
"@lage-run/scheduler-types": "^0.3.12",
"execa": "^5.1.1",
"execa": "5.1.1",
"glob-hasher": "^1.3.0"
}
}
10 changes: 5 additions & 5 deletions packages/hasher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"dependencies": {
"@lage-run/target-graph": "^0.8.8",
"@lage-run/logger": "^1.3.0",
"execa": "^5.1.1",
"workspace-tools": "^0.36.4",
"fast-glob": "^3.2.12",
"execa": "5.1.1",
"workspace-tools": "0.36.4",
"fast-glob": "3.3.1",
"glob-hasher": "^1.3.0",
"graceful-fs": "^4.2.11",
"micromatch": "^4.0.5"
"graceful-fs": "4.2.11",
"micromatch": "4.0.5"
},
"devDependencies": {
"@lage-run/monorepo-fixture": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/lage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"devDependencies": {
"@lage-run/cli": "^0.16.4",
"@lage-run/scheduler": "^1.1.11",
"backfill-config": "^6.4.1",
"backfill-config": "6.4.1",
"dts-bundle-generator": "^7.2.0",
"workspace-tools": "^0.36.4",
"workspace-tools": "0.36.4",
"esbuild": "^0.17.18"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/monorepo-fixture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
},
"devDependencies": {
"@lage-run/monorepo-scripts": "*",
"execa": "^5.1.1"
"execa": "5.1.1"
}
}
8 changes: 4 additions & 4 deletions packages/reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"@lage-run/scheduler-types": "^0.3.12",
"@lage-run/target-graph": "^0.8.8",
"@lage-run/format-hrtime": "^0.1.5",
"@ms-cloudpack/task-reporter": "^0.5.0",
"chalk": "^4.0.0",
"ansi-regex": "^5.0.1",
"gradient-string": "^2.0.1"
"@ms-cloudpack/task-reporter": "0.5.3",
"chalk": "4.1.2",
"ansi-regex": "5.0.1",
"gradient-string": "2.0.2"
},
"devDependencies": {
"memory-streams": "^0.1.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/target-graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"lint": "monorepo-scripts lint"
},
"dependencies": {
"workspace-tools": "^0.36.4"
"workspace-tools": "0.36.4"
},
"devDependencies": {
"@lage-run/monorepo-scripts": "*"
Expand Down
24 changes: 18 additions & 6 deletions renovate.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>microsoft/m365-renovate-config:beachballLibraryRecommended",
"github>microsoft/m365-renovate-config:beachball",
"github>microsoft/m365-renovate-config:disableEsmVersions",
"github>microsoft/m365-renovate-config:groupMore",
"github>microsoft/m365-renovate-config:groupTypes",
Expand All @@ -24,9 +24,7 @@
"regexManagers": [
{
"fileMatch": ["^package.json$"],
"matchStrings": [
"lage-npm\": \"lage@(?<currentValue>[~^]?\\d+\\.\\d+\\.\\d+)"
],
"matchStrings": ["lage-npm\": \"lage@(?<currentValue>[~^]?\\d+\\.\\d+\\.\\d+)"],
"depNameTemplate": "lage-npm",
"packageNameTemplate": "lage",
"datasourceTemplate": "npm",
Expand All @@ -40,16 +38,30 @@
"matchPackagePrefixes": ["docusaurus", "@docusaurus/*"]
},
{
"groupName": "lage core deps",
// Automatically pick up backfill and workspace-tools updates
"matchPackagePrefixes": ["backfill-"],
"matchPackageNames": ["backfill", "workspace-tools", "p-graph", "p-profiler", "@ms-cloudpack/task-reporter"],
"matchPackageNames": ["backfill", "workspace-tools"],
"matchUpdateTypes": ["major", "minor", "patch", "bump"],
"dependencyDashboardApproval": false
},
{
// Don't try to pin or otherwise modify in-repo deps
"matchPackagePrefixes": ["@lage-run/"],
"enabled": false
},
{
// lage bundles its dependencies, so any updates should to dependencies should be explicit
// so that they trigger a new lage version (with proper documentation of included updates).
// The standard approach of using ^ dependencies and allowing implicit updates via the lock file
// (which with a published bundle, are guaranteed to affect consumers) makes it very hard to
// track when an issue was introduced if it's discovered in another repo.
"rangeStrategy": "pin",
"matchFileNames": ["packages/**"], // ignore this for docs, scripts, root
"matchDepTypes": ["dependencies"],
// lage packages aren't an issue since they're within the repo and the latest version is always used
"excludePackagePrefixes": ["@lage-run/"],
// this is a runtime dependency of lage since it publishes binaries
"excludePackageNames": ["glob-hasher"]
}
]
}
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"ts-jest": "^29.0.0",
"eslint": "^8.20.0",
"eslint-plugin-file-extension-in-import-ts": "^1.0.1",
"workspace-tools": "^0.36.4",
"workspace-tools": "0.36.4",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7"
}
Expand Down
Loading

0 comments on commit 429047e

Please sign in to comment.