From ea65dbf56094e05f3d3c542d802e9bfd123a5a70 Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Wed, 9 Jan 2019 20:15:43 +0100 Subject: [PATCH] [BREAKING] index.js export: Remove top-level access to adapters 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). --- index.js | 3 --- test/lib/fsInterface.js | 4 ++-- test/lib/glob.js | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index d2435584..66e258d2 100644 --- a/index.js +++ b/index.js @@ -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"), diff --git a/test/lib/fsInterface.js b/test/lib/fsInterface.js index 0454bc63..cbb90e43 100644 --- a/test/lib/fsInterface.js +++ b/test/lib/fsInterface.js @@ -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) => { diff --git a/test/lib/glob.js b/test/lib/glob.js index 537815c0..32f8541a 100644 --- a/test/lib/glob.js +++ b/test/lib/glob.js @@ -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) => {