Skip to content

Commit

Permalink
[BREAKING] index.js export: Remove top-level access to adapters
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Adapters "AbstractAdapter", "FileSystem" and "Memory" used to be accessible via the top-level export of index.js (example: require("@ui5/project").FileSystem). This is no longer possible. Adapters are now grouped in the top-level object "adapters" and can be accessed from there (example: require("@ui5/project").adapters.FileSystem).
  • Loading branch information
RandomByte committed Jan 9, 2019
1 parent 705bc81 commit f1f7831
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ module.exports = {
FileSystem: require("./lib/adapters/FileSystem"),
Memory: require("./lib/adapters/Memory")
},
AbstractAdapter: require("./lib/adapters/AbstractAdapter"), // TODO 1.0 remove
FileSystem: require("./lib/adapters/FileSystem"), // TODO 1.0 remove
Memory: require("./lib/adapters/Memory"), // TODO 1.0 remove
AbstractReader: require("./lib/AbstractReader"),
AbstractReaderWriter: require("./lib/AbstractReaderWriter"),
DuplexCollection: require("./lib/DuplexCollection"),
Expand Down
4 changes: 2 additions & 2 deletions test/lib/fsInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const path = require("path");
const fs = require("fs");
const ui5Fs = require("../../");
const fsInterface = ui5Fs.fsInterface;
const MemAdapter = ui5Fs.Memory;
const FsAdapter = ui5Fs.FileSystem;
const MemAdapter = ui5Fs.adapters.Memory;
const FsAdapter = ui5Fs.adapters.FileSystem;
const Resource = ui5Fs.Resource;

const assertReadFile = (t, readFile, basepath, filepath) => {
Expand Down
4 changes: 2 additions & 2 deletions test/lib/glob.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {test} = require("ava");
const ui5Fs = require("../../");
const FsAdapter = ui5Fs.FileSystem;
const MemAdapter = ui5Fs.Memory;
const FsAdapter = ui5Fs.adapters.FileSystem;
const MemAdapter = ui5Fs.adapters.Memory;

// Create readerWriter before running tests
test.beforeEach((t) => {
Expand Down

0 comments on commit f1f7831

Please sign in to comment.