Skip to content

Commit

Permalink
Upgrade to Userscripter 5.0.0 (#271)
Browse files Browse the repository at this point in the history
I used this command to adapt the source code, as suggested in SimonAlling/userscripter#153:

```bash
for f in $(git ls-files "$(git rev-parse --show-toplevel)"); do
  sed -i 's#userscripter/build#userscripter/build-time#g' $f
  sed -i 's#userscripter/lib#userscripter/run-time#g' $f
done
```

💡 `git show --color-words='build-time|(\w|\+|=)+|.'`
  • Loading branch information
SimonAlling authored Jul 31, 2024
1 parent 5b6c9df commit 5dbeeee
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Metadata } from "userscript-metadata";
import {
BuildConfig,
metadataUrl,
} from "userscripter/build";
} from "userscripter/build-time";

import U from "./src/userscript";

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"ts-type-guards": "^0.6.1",
"typescript": "4.1.6",
"userscript-metadata": "^1.0.0",
"userscripter": "4.0.0",
"userscripter": "5.0.0",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
}
Expand Down
4 changes: 2 additions & 2 deletions src/operations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DOMCONTENTLOADED } from "userscripter/lib/environment";
import { Operation, operation } from "userscripter/lib/operations";
import { DOMCONTENTLOADED } from "userscripter/run-time/environment";
import { Operation, operation } from "userscripter/run-time/operations";

import * as CONFIG from "~src/config";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/preferences.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PreferenceManager } from "ts-preferences";
import { loggingResponseHandler, subscriptable } from "userscripter/lib/preferences";
import { loggingResponseHandler, subscriptable } from "userscripter/run-time/preferences";

import * as CONFIG from "~src/config";
import * as T from "~src/text";
Expand Down
4 changes: 2 additions & 2 deletions src/stylesheets.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as ms from "milliseconds";
import { ALWAYS } from "userscripter/lib/environment";
import { Stylesheets, stylesheet } from "userscripter/lib/stylesheets";
import { ALWAYS } from "userscripter/run-time/environment";
import { Stylesheets, stylesheet } from "userscripter/run-time/stylesheets";

import * as CONFIG from "~src/config";
import { isInEditMode, isOnBSCPreferencesPage, isOnSweclockersSettingsPage, isReadingThread } from "~src/environment";
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
distFileName,
DEFAULT_BUILD_CONFIG,
DEFAULT_METADATA_SCHEMA,
} from "userscripter/build";
} from "userscripter/build-time";
import * as webpack from "webpack";
import { RawSource } from "webpack-sources";

Expand Down

0 comments on commit 5dbeeee

Please sign in to comment.