-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
the test fixtures were picking up the presence of vite in the project and the number of detected frameworks changed
✅ Deploy Preview for framework-info ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
{ | ||
"name": "test", | ||
"version": "1.0.0" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needed to be added because otherwise the logic in framework-info
would detect the root project's package.json
. This ensures that we're truly testing when no framework is detected in a project
test/detect.js
Outdated
@@ -31,7 +31,7 @@ test('Should ignore if matching any framework.excludedNpmDependencies', async (t | |||
|
|||
test('Should detect config files', async (t) => { | |||
const frameworks = await getFrameworks('config_files') | |||
t.is(frameworks.length, 1) | |||
t.is(frameworks.length, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because vite
exists within the project, framework-info
is now picking that up as well as the framework for which these were originally checking for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a package.json in the test/fixtures/config_files
folder like in test/fixtures/empty
fixes this, so it only picks up the one framework, middleman
.
e.g. package.json
{
"name": "test",
"version": "1.0.0"
}
So this can stay as
t.is(frameworks.length, 2) | |
t.is(frameworks.length, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
test/detect.js
Outdated
@@ -31,7 +31,7 @@ test('Should ignore if matching any framework.excludedNpmDependencies', async (t | |||
|
|||
test('Should detect config files', async (t) => { | |||
const frameworks = await getFrameworks('config_files') | |||
t.is(frameworks.length, 1) | |||
t.is(frameworks.length, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a package.json in the test/fixtures/config_files
folder like in test/fixtures/empty
fixes this, so it only picks up the one framework, middleman
.
e.g. package.json
{
"name": "test",
"version": "1.0.0"
}
So this can stay as
t.is(frameworks.length, 2) | |
t.is(frameworks.length, 1) |
I ran {
"frameworks": [
{
"id": "eleventy",
"name": "Eleventy",
"category": "static_site_generator",
"dev": {
"commands": ["npm run serve"],
"port": 8080,
"pollingStrategies": [
{
"name": "TCP"
},
{
"name": "HTTP"
}
]
},
"build": {
"commands": ["eleventy"],
"directory": "_site"
},
"env": {},
"logo": {
"default": "https://framework-info.netlify.app/logos/eleventy/default.svg",
"light": "https://framework-info.netlify.app/logos/eleventy/default.svg",
"dark": "https://framework-info.netlify.app/logos/eleventy/default.svg"
},
"plugins": []
}
]
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes! 🚀
Summary
Replaces webpack with vite to build.
Is far easier to configure and maintain.
Testing
cli
package.json
of the package, by runningnpm version major
(major bacause Node.js 12 has been dropped in favour of Node.js 14) and runnpm pack
build-info
project, runnpm install
and then runnpm install <path to the .tgz>
, e.g.npm install ../framework-info/netlify-framework-info-10.0.0.tgz
npm link
from the root of the build-info repositorybuild-info <project path>
against a test projectUI
netlify-react-ui
project, runyarn install
and then runyarn add <path to the .tgz>
, e.g.yarn add ../framework-info/netlify-framework-info-10.0.0.tgz
For us to review and ship your PR efficiently, please perform the following steps:
ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a
typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)