Skip to content

Commit

Permalink
Merge pull request #1 from alfredsgenkins/master
Browse files Browse the repository at this point in the history
Fixed issues introduced
  • Loading branch information
jherr authored Feb 3, 2021
2 parents 6a1458c + 59ab572 commit 8ac9f33
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Following issues were discovered in this repository

1. Folder `plugins` may only contain plugins, which export an object, components, anything else can not be located here. Action: **I will try adding more detailed message about that!**.
2. Extensions can not enable themself - the enabled extension resoltion is recurive - from your application root we scan all enabled extensions up, so it is not reccomended to enable extension in the same extension. Action - **I will try adding an warnign about that**
3. For some reason, potentially for some babel-specific reason the following code: `import React from "react";` and then `React.Component` did not function correctly. Use the `import { Component } from "react";` instead. This is a bug, but I am not sure if I will be able to address it soon enough.
4. Finally and most importantly, the local modules can only by symlinked if their version in `package.json` starts with `link:` and you are using `yarn` or `file:` but then manual symlinking is needed (`yarn link` or `npm link`).
5 changes: 1 addition & 4 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"main": "index.js",
"license": "MIT",
"scandipwa": {
"type": "extension",
"extensions": {
"extension": true
}
"type": "extension"
}
}
4 changes: 2 additions & 2 deletions extension/src/plugin/WelcomePageComponent.plugin.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import HelloWorldComponent from "./components/HelloWorldComponent";
import HelloWorldComponent from "../components/HelloWorldComponent";

export default {
"scandi-test/WelcomePageComponent": {
"member-function": {
renderHello: () => "Foobar",
renderHello: () => <HelloWorldComponent />,
},
},
};
2 changes: 1 addition & 1 deletion scandi-test/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"/Users/jherr/tmp/scandi-test/scandi-test/src/index.js":"1","/Users/jherr/tmp/scandi-test/scandi-test/src/reportWebVitals.js":"2","/Users/jherr/tmp/scandi-test/scandi-test/src/WelcomePageComponent.js":"3","/Users/jherr/tmp/scandi-test/scandi-test/src/App.js":"4"},{"size":500,"mtime":1612215764585,"results":"5","hashOfConfig":"6"},{"size":362,"mtime":1612215764586,"results":"7","hashOfConfig":"6"},{"size":420,"mtime":1612217043178,"results":"8","hashOfConfig":"6"},{"size":184,"mtime":1612216611092,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1wafsoe",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/jherr/tmp/scandi-test/scandi-test/src/index.js",[],"/Users/jherr/tmp/scandi-test/scandi-test/src/reportWebVitals.js",[],"/Users/jherr/tmp/scandi-test/scandi-test/src/WelcomePageComponent.js",[],"/Users/jherr/tmp/scandi-test/scandi-test/src/App.js",[]]
[{"/home/scandiweb/Projects/scandi-test/scandi-test/src/index.js":"1","/home/scandiweb/Projects/scandi-test/scandi-test/src/reportWebVitals.js":"2","/home/scandiweb/Projects/scandi-test/scandi-test/src/WelcomePageComponent.js":"3","/home/scandiweb/Projects/scandi-test/scandi-test/src/App.js":"4"},{"size":500,"mtime":1612267396923,"results":"5","hashOfConfig":"6"},{"size":362,"mtime":1612267396923,"results":"7","hashOfConfig":"6"},{"size":422,"mtime":1612267505084,"results":"8","hashOfConfig":"6"},{"size":184,"mtime":1612267396923,"results":"9","hashOfConfig":"6"},{"filePath":"10","messages":"11","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"9x3575",{"filePath":"12","messages":"13","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/scandiweb/Projects/scandi-test/scandi-test/src/index.js",[],"/home/scandiweb/Projects/scandi-test/scandi-test/src/reportWebVitals.js",[],"/home/scandiweb/Projects/scandi-test/scandi-test/src/WelcomePageComponent.js",[],"/home/scandiweb/Projects/scandi-test/scandi-test/src/App.js",[]]
2 changes: 1 addition & 1 deletion scandi-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"extension": "^0.2.2",
"extension": "link:../extension",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
Expand Down
4 changes: 2 additions & 2 deletions scandi-test/src/WelcomePageComponent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Component } from "react";

/** @namespace scandi-test/WelcomePageComponent */
export class WelcomePageComponent extends React.Component {
export class WelcomePageComponent extends Component {
renderHello() {
return "Hello - default value";
}
Expand Down
7 changes: 3 additions & 4 deletions scandi-test/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5305,10 +5305,9 @@ extend@~3.0.2:
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==

extension@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/extension/-/extension-0.2.2.tgz#a1e37c4ae1c8ea32e0172cbc23f9bb2ae451ecd1"
integrity sha512-Ui0gR2zpiK2PrHLf4xmujfPoKP5K9H4UhE4maIlPF0NCNRoGsS0yJXRa8sbCa1DglaPIi1Svjwj0OzL5yYkBqw==
"extension@link:../extension":
version "0.0.0"
uid ""

external-editor@^3.0.3:
version "3.1.0"
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


0 comments on commit 8ac9f33

Please sign in to comment.