Skip to content

Commit

Permalink
refactor(examples): Make all depdendencies into devDeps in the simple…
Browse files Browse the repository at this point in the history
…mde example (microsoft#23110)

## Description

Switches all dependencies in the simplemde example app to be
devDependencies.

The example apps in the repo are not production code and aren't
published or deployed anywhere. Having prod dependencies in them causes
our lockfiles to mark them as such, and consequently Component
Governance potentially flags them for prod-level security
vulnerabilities. We have one outstanding prod-level alert about the
simplemde package (which seems abandoned); this change should remove the
prod-level severity from it while we migrate to another package for this
example, or get rid of it altogether.

The [ai-collab sample app already showcases this
pattern](https://github.com/microsoft/FluidFramework/blob/main/examples/apps/ai-collab/package.json#L33).
  • Loading branch information
alexvy86 authored Nov 19, 2024
1 parent adc25b0 commit a772c76
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 39 deletions.
6 changes: 5 additions & 1 deletion examples/data-objects/smde/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ module.exports = {
require.resolve("@fluidframework/eslint-config-fluid/minimal-deprecated"),
"prettier",
],
rules: {},
rules: {
// This is an example/test app; all its dependencies are dev dependencies so as not to pollute the lockfile
// with prod dependencies that aren't actually shipped. So don't complain when importing from dev dependencies.
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
},
};
19 changes: 9 additions & 10 deletions examples/data-objects/smde/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,35 @@
"webpack": "webpack --env production",
"webpack:dev": "webpack --env development"
},
"dependencies": {
"dependencies": {},
"devDependencies": {
"@biomejs/biome": "~1.9.3",
"@fluid-example/example-utils": "workspace:~",
"@fluid-example/webpack-fluid-loader": "workspace:~",
"@fluidframework/aqueduct": "workspace:~",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/container-definitions": "workspace:~",
"@fluidframework/container-runtime": "workspace:~",
"@fluidframework/container-runtime-definitions": "workspace:~",
"@fluidframework/core-interfaces": "workspace:~",
"@fluidframework/core-utils": "workspace:~",
"@fluidframework/datastore": "workspace:~",
"@fluidframework/datastore-definitions": "workspace:~",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/map": "workspace:~",
"@fluidframework/request-handler": "workspace:~",
"@fluidframework/runtime-definitions": "workspace:~",
"@fluidframework/runtime-utils": "workspace:~",
"@fluidframework/sequence": "workspace:~",
"react": "^18.3.1",
"simplemde": "^1.11.2"
},
"devDependencies": {
"@biomejs/biome": "~1.9.3",
"@fluid-example/webpack-fluid-loader": "workspace:~",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@types/react": "^18.3.11",
"@types/simplemde": "^1.11.7",
"css-loader": "^7.1.2",
"eslint": "~8.55.0",
"prettier": "~3.0.3",
"react": "^18.3.1",
"rimraf": "^4.4.0",
"simplemde": "^1.11.2",
"style-loader": "^4.0.0",
"ts-loader": "^9.5.1",
"typescript": "~5.4.5",
Expand Down
54 changes: 26 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a772c76

Please sign in to comment.